Merged host and SDK help
Change help according to https://github.com/dotnet/cli/issues/6215
This commit is contained in:
parent
6647eddf24
commit
88b2e06dd1
3 changed files with 90 additions and 67 deletions
|
@ -3,43 +3,45 @@
|
||||||
internal static class HelpUsageText
|
internal static class HelpUsageText
|
||||||
{
|
{
|
||||||
public static readonly string UsageText =
|
public static readonly string UsageText =
|
||||||
$@"{LocalizableStrings.Usage}: dotnet [host-options] [command] [arguments] [common-options]
|
$@"{LocalizableStrings.Usage}: dotnet [runtime-options] [path-to-application]
|
||||||
|
{LocalizableStrings.Usage}: dotnet [command] [arguments] [command-options]
|
||||||
|
|
||||||
{LocalizableStrings.Arguments}:
|
path-to-application:
|
||||||
[command] {LocalizableStrings.CommandDefinition}
|
{LocalizableStrings.PathToApplicationDefinition}
|
||||||
[arguments] {LocalizableStrings.ArgumentsDefinition}
|
|
||||||
[host-options] {LocalizableStrings.HostOptionsDefinition}
|
|
||||||
[common-options] {LocalizableStrings.OptionsDescription}
|
|
||||||
|
|
||||||
{LocalizableStrings.CommonOptions}:
|
|
||||||
-v|--verbose {LocalizableStrings.VerboseDefinition}
|
|
||||||
-h|--help {LocalizableStrings.HelpDefinition}
|
|
||||||
|
|
||||||
{LocalizableStrings.HostOptions}:
|
|
||||||
-d|--diagnostics {LocalizableStrings.DiagnosticsDefinition}
|
|
||||||
--version {LocalizableStrings.VersionDescription}
|
|
||||||
--info {LocalizableStrings.InfoDescription}
|
|
||||||
|
|
||||||
{LocalizableStrings.Commands}:
|
{LocalizableStrings.Commands}:
|
||||||
new {LocalizableStrings.NewDefinition}
|
new {LocalizableStrings.NewDefinition}
|
||||||
restore {LocalizableStrings.RestoreDefinition}
|
restore {LocalizableStrings.RestoreDefinition}
|
||||||
|
run {LocalizableStrings.RunDefinition}
|
||||||
build {LocalizableStrings.BuildDefinition}
|
build {LocalizableStrings.BuildDefinition}
|
||||||
publish {LocalizableStrings.PublishDefinition}
|
publish {LocalizableStrings.PublishDefinition}
|
||||||
run {LocalizableStrings.RunDefinition}
|
|
||||||
test {LocalizableStrings.TestDefinition}
|
test {LocalizableStrings.TestDefinition}
|
||||||
pack {LocalizableStrings.PackDefinition}
|
pack {LocalizableStrings.PackDefinition}
|
||||||
migrate {LocalizableStrings.MigrateDefinition}
|
migrate {LocalizableStrings.MigrateDefinition}
|
||||||
clean {LocalizableStrings.CleanDefinition}
|
clean {LocalizableStrings.CleanDefinition}
|
||||||
sln {LocalizableStrings.SlnDefinition}
|
sln {LocalizableStrings.SlnDefinition}
|
||||||
|
|
||||||
{LocalizableStrings.ProjectModificationCommands}:
|
|
||||||
add {LocalizableStrings.AddDefinition}
|
add {LocalizableStrings.AddDefinition}
|
||||||
remove {LocalizableStrings.RemoveDefinition}
|
remove {LocalizableStrings.RemoveDefinition}
|
||||||
list {LocalizableStrings.ListDefinition}
|
list {LocalizableStrings.ListDefinition}
|
||||||
|
|
||||||
{LocalizableStrings.AdvancedCommands}:
|
|
||||||
nuget {LocalizableStrings.NugetDefinition}
|
nuget {LocalizableStrings.NugetDefinition}
|
||||||
msbuild {LocalizableStrings.MsBuildDefinition}
|
msbuild {LocalizableStrings.MsBuildDefinition}
|
||||||
vstest {LocalizableStrings.VsTestDefinition}";
|
vstest {LocalizableStrings.VsTestDefinition}
|
||||||
}
|
-v|--version {LocalizableStrings.SDKVersionCommandDefinition}
|
||||||
|
-i|--info {LocalizableStrings.SDKInfoCommandDefinition}
|
||||||
|
-d|--diagnostics {LocalizableStrings.SDKDiagnosticsCommandDefinition}
|
||||||
|
|
||||||
|
{LocalizableStrings.CommonOptions}:
|
||||||
|
-v|--verbose {LocalizableStrings.VerboseDefinition}
|
||||||
|
-h|--help {LocalizableStrings.HelpDefinition}
|
||||||
|
|
||||||
|
{LocalizableStrings.RunDotnetCommandHelpForMore}
|
||||||
|
|
||||||
|
runtime-options:
|
||||||
|
--additionalprobingpath <path> {LocalizableStrings.AdditionalprobingpathDefinition}
|
||||||
|
--depsfile <path> {LocalizableStrings.DepsfilDefinition}
|
||||||
|
--runtimeconfig <path> {LocalizableStrings.RuntimeconfigDefinition}
|
||||||
|
--fx-version <version> {LocalizableStrings.FxVersionDefinition}
|
||||||
|
--roll-forward-on-no-candidate-fx {LocalizableStrings.RollForwardOnNoCandidateFxDefinition}
|
||||||
|
--additional-deps <path> {LocalizableStrings.AdditionalDeps}
|
||||||
|
";
|
||||||
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace Microsoft.DotNet.Tools.Help
|
||||||
|
|
||||||
public const string InfoDescription = "Display .NET CLI Info";
|
public const string InfoDescription = "Display .NET CLI Info";
|
||||||
|
|
||||||
public const string Commands = "Commands";
|
public const string Commands = "SDK commands";
|
||||||
|
|
||||||
public const string NewDefinition = "Initialize .NET projects.";
|
public const string NewDefinition = "Initialize .NET projects.";
|
||||||
|
|
||||||
|
@ -51,11 +51,11 @@ namespace Microsoft.DotNet.Tools.Help
|
||||||
|
|
||||||
public const string ProjectModificationCommands = "Project modification commands";
|
public const string ProjectModificationCommands = "Project modification commands";
|
||||||
|
|
||||||
public const string AddDefinition = "Add items to the project.";
|
public const string AddDefinition = "Add reference to the project.";
|
||||||
|
|
||||||
public const string RemoveDefinition = "Remove items from the project.";
|
public const string RemoveDefinition = "Remove reference from the project.";
|
||||||
|
|
||||||
public const string ListDefinition = "List items in the project.";
|
public const string ListDefinition = "List reference in the project.";
|
||||||
|
|
||||||
public const string AdvancedCommands = "Advanced Commands";
|
public const string AdvancedCommands = "Advanced Commands";
|
||||||
|
|
||||||
|
@ -79,7 +79,26 @@ namespace Microsoft.DotNet.Tools.Help
|
||||||
|
|
||||||
public const string CommandArgumentDescription = "CLI command for which to view more detailed help.";
|
public const string CommandArgumentDescription = "CLI command for which to view more detailed help.";
|
||||||
|
|
||||||
|
public const string PathToApplicationDefinition = "The path to an application .dll file to execute.";
|
||||||
|
|
||||||
|
public const string SDKVersionCommandDefinition = "Display .NET Core SDK version.";
|
||||||
|
|
||||||
|
public const string SDKInfoCommandDefinition = "Display .NET Core information.";
|
||||||
|
|
||||||
|
public const string SDKDiagnosticsCommandDefinition = "Enable diagnostic output.";
|
||||||
|
|
||||||
|
public const string RunDotnetCommandHelpForMore = "Run 'dotnet COMMAND --help' for more information on a command.";
|
||||||
|
|
||||||
|
public const string AdditionalprobingpathDefinition = "Path containing probing policy and assemblies to probe for.";
|
||||||
|
|
||||||
|
public const string DepsfilDefinition = "Path to <application>.deps.json file.";
|
||||||
|
|
||||||
|
public const string RuntimeconfigDefinition = "Path to <application>.runtimeconfig.json file.";
|
||||||
|
|
||||||
|
public const string FxVersionDefinition = "Version of the installed Shared Framework to use to run the application.";
|
||||||
|
|
||||||
|
public const string RollForwardOnNoCandidateFxDefinition = "Roll forward on no candidate shared framework is enabled.";
|
||||||
|
|
||||||
|
public const string AdditionalDeps = "Path to additonal deps.json file.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,44 +15,46 @@ namespace Microsoft.DotNet.Help.Tests
|
||||||
public class GivenThatIWantToShowHelpForDotnetCommand : TestBase
|
public class GivenThatIWantToShowHelpForDotnetCommand : TestBase
|
||||||
{
|
{
|
||||||
private const string HelpText =
|
private const string HelpText =
|
||||||
@"Usage: dotnet [host-options] [command] [arguments] [common-options]
|
@"Usage: dotnet [runtime-options] [path-to-application]
|
||||||
|
Usage: dotnet [command] [arguments] [command-options]
|
||||||
|
|
||||||
Arguments:
|
path-to-application:
|
||||||
[command] The command to execute
|
The path to an application .dll file to execute.
|
||||||
[arguments] Arguments to pass to the command
|
|
||||||
[host-options] Options specific to dotnet (host)
|
|
||||||
[common-options] Options common to all commands
|
|
||||||
|
|
||||||
Common options:
|
SDK commands:
|
||||||
-v|--verbose Enable verbose output
|
|
||||||
-h|--help Show help
|
|
||||||
|
|
||||||
Host options (passed before the command):
|
|
||||||
-d|--diagnostics Enable diagnostic output
|
|
||||||
--version Display .NET CLI Version Number
|
|
||||||
--info Display .NET CLI Info
|
|
||||||
|
|
||||||
Commands:
|
|
||||||
new Initialize .NET projects.
|
new Initialize .NET projects.
|
||||||
restore Restore dependencies specified in the .NET project.
|
restore Restore dependencies specified in the .NET project.
|
||||||
|
run Compiles and immediately executes a .NET project.
|
||||||
build Builds a .NET project.
|
build Builds a .NET project.
|
||||||
publish Publishes a .NET project for deployment (including the runtime).
|
publish Publishes a .NET project for deployment (including the runtime).
|
||||||
run Compiles and immediately executes a .NET project.
|
|
||||||
test Runs unit tests using the test runner specified in the project.
|
test Runs unit tests using the test runner specified in the project.
|
||||||
pack Creates a NuGet package.
|
pack Creates a NuGet package.
|
||||||
migrate Migrates a project.json based project to a msbuild based project.
|
migrate Migrates a project.json based project to a msbuild based project.
|
||||||
clean Clean build output(s).
|
clean Clean build output(s).
|
||||||
sln Modify solution (SLN) files.
|
sln Modify solution (SLN) files.
|
||||||
|
add Add reference to the project.
|
||||||
Project modification commands:
|
remove Remove reference from the project.
|
||||||
add Add items to the project.
|
list List reference in the project.
|
||||||
remove Remove items from the project.
|
|
||||||
list List items in the project.
|
|
||||||
|
|
||||||
Advanced Commands:
|
|
||||||
nuget Provides additional NuGet commands.
|
nuget Provides additional NuGet commands.
|
||||||
msbuild Runs Microsoft Build Engine (MSBuild).
|
msbuild Runs Microsoft Build Engine (MSBuild).
|
||||||
vstest Runs Microsoft Test Execution Command Line Tool.";
|
vstest Runs Microsoft Test Execution Command Line Tool.
|
||||||
|
-v|--version Display .NET Core SDK version.
|
||||||
|
-i|--info Display .NET Core information.
|
||||||
|
-d|--diagnostics Enable diagnostic output.
|
||||||
|
|
||||||
|
Common options:
|
||||||
|
-v|--verbose Enable verbose output
|
||||||
|
-h|--help Show help
|
||||||
|
|
||||||
|
Run 'dotnet COMMAND --help' for more information on a command.
|
||||||
|
|
||||||
|
runtime-options:
|
||||||
|
--additionalprobingpath <path> Path containing probing policy and assemblies to probe for.
|
||||||
|
--depsfile <path> Path to <application>.deps.json file.
|
||||||
|
--runtimeconfig <path> Path to <application>.runtimeconfig.json file.
|
||||||
|
--fx-version <version> Version of the installed Shared Framework to use to run the application.
|
||||||
|
--roll-forward-on-no-candidate-fx Roll forward on no candidate shared framework is enabled.
|
||||||
|
--additional-deps <path> Path to additonal deps.json file.";
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData("--help")]
|
[InlineData("--help")]
|
||||||
|
|
Loading…
Add table
Reference in a new issue