- @Html.ShowLabelFor(m => m.OrganizationName)
+ @Html.ShowLabelFor(m => m.OrganizationName)
@Html.ShowTextBoxFor(m => m.OrganizationName)
This will be your organization account on @Url.User("{username}", relativeUrl: false).
@Html.ShowValidationMessagesFor(m => m.OrganizationName)
- @Html.ShowLabelFor(m => m.OrganizationEmailAddress)
+
@Html.ShowLabelFor(m => m.OrganizationEmailAddress)
@Html.ShowTextBoxFor(m => m.OrganizationEmailAddress)
Users can contact your organization at this email address.
@Html.ShowValidationMessagesFor(m => m.OrganizationEmailAddress)
diff --git a/src/NuGetGallery/Views/Packages/DisplayPackage.cshtml b/src/NuGetGallery/Views/Packages/DisplayPackage.cshtml
index b134d7d6ef..5e8cd2e526 100644
--- a/src/NuGetGallery/Views/Packages/DisplayPackage.cshtml
+++ b/src/NuGetGallery/Views/Packages/DisplayPackage.cshtml
@@ -28,19 +28,32 @@
{
packageManagers = new PackageManagerViewModel[]
{
- new PackageManagerViewModel(".NET CLI")
+ new PackageManagerViewModel(".NET CLI (Global)")
{
- Id = "dotnet-cli",
+ Id = "dotnet-cli-global",
+ CommandPrefix = "> ",
+ InstallPackageCommands = new [] { string.Format("dotnet tool install --global {0} --version {1}", Model.Id, Model.Version) },
+ AlertLevel = AlertLevel.Info,
+ AlertMessage = "This package contains a
.NET tool you can call from the shell/command line.",
+ },
+
+ new PackageManagerViewModel(".NET CLI (Local)")
+ {
+ Id = "dotnet-cli-local",
CommandPrefix = "> ",
- InstallPackageCommand = string.Format("dotnet tool install --global {0} --version {1}", Model.Id, Model.Version),
+ InstallPackageCommands = new []
+ {
+ "dotnet new tool-manifest # if you are setting up this repo",
+ string.Format("dotnet tool install --local {0} --version {1}", Model.Id, Model.Version),
+ },
AlertLevel = AlertLevel.Info,
- AlertMessage = "This package contains a
.NET Core Global Tool you can call from the shell/command line.",
+ AlertMessage = "This package contains a
.NET tool you can call from the shell/command line.",
},
new ThirdPartyPackageManagerViewModel("Cake", "https://cakebuild.net/support/nuget")
{
Id = "cake-dotnet-tool",
- InstallPackageCommand = Model.GetCakeInstallPackageCommand(),
+ InstallPackageCommands = new [] { Model.GetCakeInstallPackageCommand() },
},
};
}
@@ -52,7 +65,7 @@
{
Id = "dotnet-cli",
CommandPrefix = "> ",
- InstallPackageCommand = string.Format("dotnet new --install {0}::{1}", Model.Id, Model.Version),
+ InstallPackageCommands = new [] { string.Format("dotnet new --install {0}::{1}", Model.Id, Model.Version) },
AlertLevel = AlertLevel.Info,
AlertMessage = "This package contains a
.NET Core Template Package you can call from the shell/command line.",
}
@@ -66,26 +79,26 @@
{
Id = "package-manager",
CommandPrefix = "PM> ",
- InstallPackageCommand = string.Format("Install-Package {0} -Version {1}", Model.Id, Model.Version)
+ InstallPackageCommands = new [] { string.Format("Install-Package {0} -Version {1}", Model.Id, Model.Version) },
},
new PackageManagerViewModel(".NET CLI")
{
Id = "dotnet-cli",
CommandPrefix = "> ",
- InstallPackageCommand = string.Format("dotnet add package {0} --version {1}", Model.Id, Model.Version)
+ InstallPackageCommands = new [] { string.Format("dotnet add package {0} --version {1}", Model.Id, Model.Version) },
},
new PackageManagerViewModel("PackageReference")
{
Id = "package-reference",
- InstallPackageCommand = Model.DevelopmentDependency
+ InstallPackageCommands = new [] { Model.DevelopmentDependency
? string.Format(string.Join(Environment.NewLine,
"
",
" all",
" runtime; build; native; contentfiles; analyzers",
""), Model.Id, Model.Version)
- : string.Format("
", Model.Id, Model.Version),
+ : string.Format("
", Model.Id, Model.Version) },
AlertLevel = AlertLevel.Info,
AlertMessage = string.Format("For projects that support
PackageReference, copy this XML node into the project file to reference the package.",
"https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files"),
@@ -96,24 +109,22 @@
{
Id = "paket-cli",
CommandPrefix = "> ",
- InstallPackageCommand = string.Format("paket add {0} --version {1}", Model.Id, Model.Version),
+ InstallPackageCommands = new [] { string.Format("paket add {0} --version {1}", Model.Id, Model.Version) },
},
- new PackageManagerViewModel("F# Interactive")
+ new PackageManagerViewModel("Script & Interactive")
{
- Id = "fsharp-interactive",
+ Id = "script-interactive",
CommandPrefix = "> ",
- InstallPackageCommand = string.Format("#r \"nuget: {0}, {1}\"", Model.Id, Model.Version),
+ InstallPackageCommands = new [] { string.Format("#r \"nuget: {0}, {1}\"", Model.Id, Model.Version) },
AlertLevel = AlertLevel.Info,
- AlertMessage = string.Format(
- "For F# scripts that support
#r syntax, copy this into the source code to reference the package.",
- "https://docs.microsoft.com/en-us/dotnet/fsharp/tools/fsharp-interactive/#referencing-packages-in-f-interactive")
+ AlertMessage = "#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package."
},
new ThirdPartyPackageManagerViewModel("Cake", "https://cakebuild.net/support/nuget")
{
Id = Model.IsCakeExtension() ? "cake-extension" : "cake",
- InstallPackageCommand = Model.GetCakeInstallPackageCommand()
+ InstallPackageCommands = new [] { Model.GetCakeInstallPackageCommand() },
},
};
}
@@ -165,11 +176,15 @@
@helper CommandPanel(PackageManagerViewModel packageManager, bool active)
{
var thirdPartyPackageManager = packageManager as ThirdPartyPackageManagerViewModel;
-
-
@packageManager.InstallPackageCommand
+ @{
+ var lastIndex = packageManager.InstallPackageCommands.Length - 1;
+ var cs = packageManager.InstallPackageCommands.Select((c, i) => i < lastIndex ? c + Environment.NewLine : c);
+ }
+ @* Writing out the install command must be on a single line to avoid undesired whitespace in the
tag. *@
+ @foreach (var c in cs) {@c}