File tree Expand file tree Collapse file tree
src/NuGetGallery/Views/Packages Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
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 )
You can’t perform that action at this time.
0 commit comments