Improve command line help user experience.

This commit attempts to make the command line help user experience for `dotnet`
more consistent for all of the built-in SDK commands.

The following has been changed:

* Organized the top-level help into a section detailing how to run .NET
  applications and a section on running SDK commands.
* Sorted the SDK commands by name (previous ordering was undefined).
* Removed `--verbosity` from the "common options section" since it is not a
  top-level option, nor is it common to all commands.
* Added missing parameter names for parameterized options (especially for the
  `dotnet tool` subcommands).
* Fixed the localization of parameter names for parameterized options.
* Added missing `PROJECT` parameter to a few commands.
* Fixed the localization of the build command's `PROJECT` parameter description.
* Fixed the confusing descriptions for the `--framework`, `--configuration`,
  and `--runtime` options that were being shared between different commands.
* Fixed the "unknown command" error for `dotnet help <command>` to show in red.
* Deleted .resx for `dotnet msbuild` that is no longer used.
* Change the option descriptions to be more consistent in their grammatical
  structure.
* Removed extra blank line from end of help output.

Fixes #7431.
Fixes #9230.
Fixes #9165.
This commit is contained in:
Peter Huene 2018-04-30 13:42:47 -07:00
parent a45bba7eb9
commit 88e2e9e993
No known key found for this signature in database
GPG key ID: E1D265D820213D6A
363 changed files with 6214 additions and 4797 deletions

View file

@ -19,12 +19,11 @@ namespace Microsoft.DotNet.Cli.Add.Reference.Tests
Arguments:
<PROJECT> The project file to operate on. If a file is not specified, the command will search the current directory for one.
<PROJECT_PATH> Project to project references to add
<PROJECT_PATH> The paths to the projects to add as references.
Options:
-h, --help Show help information.
-f, --framework <FRAMEWORK> Add reference only when targeting a specific framework
";
-h, --help Show command line help.
-f, --framework <FRAMEWORK> Add the reference only when targeting a specific framework.";
private const string AddCommandHelpText = @"Usage: dotnet add [options] <PROJECT> [command]
@ -32,12 +31,11 @@ Arguments:
<PROJECT> The project file to operate on. If a file is not specified, the command will search the current directory for one.
Options:
-h, --help Show help information.
-h, --help Show command line help.
Commands:
package <PACKAGE_NAME> Add a NuGet package reference to the project.
reference <PROJECT_PATH> Add a project-to-project reference to the project.
";
reference <PROJECT_PATH> Add a project-to-project reference to the project.";
const string FrameworkNet451Arg = "-f net451";
const string ConditionFrameworkNet451 = "== 'net451'";