Skip to content

Commit bdf9d2e

Browse files
authored
Merge pull request #10619 from NuGet/dev
[ReleasePrep][2025.11.04]RI of dev into main
2 parents 29ba9fc + 25238e9 commit bdf9d2e

1 file changed

Lines changed: 18 additions & 5 deletions

File tree

src/NuGetGallery/Views/Packages/DisplayPackage.cshtml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,19 @@
179179
AlertLevel = AlertLevel.Info,
180180
AlertMessage = string.Format("For projects that support Sdk, copy this XML node into the project file to reference the package."),
181181
CopyLabel = "Copy the SDK XML node",
182-
}
182+
},
183+
184+
new PackageManagerViewModel(
185+
"dotnet-run-file",
186+
"File-based Apps",
187+
new PackageManagerViewModel.InstallPackageCommand(
188+
string.Format("#:sdk {0}@{1}", Model.Id, Model.Version)
189+
)
190+
)
191+
{
192+
AlertLevel = AlertLevel.Info,
193+
AlertMessage = "#:sdk directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.",
194+
},
183195
};
184196
}
185197
else
@@ -1621,17 +1633,18 @@
16211633
</style>
16221634

16231635
<script type="text/javascript" nonce="@Html.GetCSPNonce()">
1624-
var packageId = @Html.ToJson(Model.Id);
1625-
var packageVersion = @Html.ToJson(Model.Version);
1626-
var packageManagers = @Html.ToJson(
1636+
window.nuget = window.nuget || {};
1637+
window.nuget.packageId = @Html.ToJson(Model.Id);
1638+
window.nuget.packageVersion = @Html.ToJson(Model.Version);
1639+
window.nuget.packageManagers = @Html.ToJson(
16271640
(
16281641
from pm in packageManagers
16291642
from ipc in pm.InstallPackageCommands
16301643
select ipc.Key
16311644
)
16321645
.ToList()
16331646
);
1634-
var sponsorshipUrlCount = @sponsorshipUrlCount;
1647+
window.nuget.sponsorshipUrlCount = @sponsorshipUrlCount;
16351648
</script>
16361649

16371650
@if (Model.IsMarkdigMdSyntaxHighlightEnabled)

0 commit comments

Comments
 (0)