Skip to content

Commit 847a945

Browse files
authored
Add sdk snippet for file-based apps (#10548)
1 parent e4ba227 commit 847a945

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

src/NuGetGallery/Views/Packages/DisplayPackage.cshtml

Lines changed: 13 additions & 1 deletion
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

0 commit comments

Comments
 (0)