From b7f3e39413f404614086b8bd03c47a70d745b81d Mon Sep 17 00:00:00 2001 From: Zlatko Knezevic Date: Thu, 15 Dec 2016 23:11:18 -0800 Subject: [PATCH] Finishing touches on help messages Making finishing touches on all the CLI commands' help messages. Also adding dotnet clean to the help output list. Fixes #5048,#5017 --- .../commands/dotnet-build/LocalizableStrings.cs | 8 ++++---- .../commands/dotnet-clean/LocalizableStrings.cs | 6 +++--- src/dotnet/commands/dotnet-help/HelpCommand.cs | 1 + .../commands/dotnet-help/LocalizableStrings.cs | 2 ++ .../commands/dotnet-migrate/LocalizableStrings.cs | 5 +---- .../commands/dotnet-pack/LocalizableStrings.cs | 14 +++++++------- .../commands/dotnet-publish/LocalizableStrings.cs | 10 +++++----- .../commands/dotnet-restore/LocalizableStrings.cs | 4 ++-- .../commands/dotnet-run/LocalizableStrings.cs | 6 ++++-- src/dotnet/commands/dotnet-run/Program.cs | 2 +- 10 files changed, 30 insertions(+), 28 deletions(-) diff --git a/src/dotnet/commands/dotnet-build/LocalizableStrings.cs b/src/dotnet/commands/dotnet-build/LocalizableStrings.cs index 74f0d83df..7c5f85371 100644 --- a/src/dotnet/commands/dotnet-build/LocalizableStrings.cs +++ b/src/dotnet/commands/dotnet-build/LocalizableStrings.cs @@ -6,19 +6,19 @@ public const string AppFullName = ".NET Builder"; - public const string ConfigurationOptionDescription = "Configuration under which to build"; + public const string ConfigurationOptionDescription = "Configuration to use for buulding the project. Default is \"Debug\"."; public const string ConfigurationOptionName = "CONFIGURATION"; - public const string FrameworkOptionDescription = "Compile a specific framework"; + public const string FrameworkOptionDescription = "Target framework to build for. The target framework has to be specified in the project file."; public const string FrameworkOptionName = "FRAMEWORK"; public const string NoDependenciesOptionDescription = "Set this flag to ignore project to project references and only build the root project"; - public const string NoIncrementialOptionDescription = "Set this flag to turn off incremental build"; + public const string NoIncrementialOptionDescription = "Disables incremental build."; - public const string OutputOptionDescription = "Directory in which to place outputs"; + public const string OutputOptionDescription = "Output directory in which to place built artifacts."; public const string OutputOptionName = "OUTPUT_DIR"; diff --git a/src/dotnet/commands/dotnet-clean/LocalizableStrings.cs b/src/dotnet/commands/dotnet-clean/LocalizableStrings.cs index e1ea99763..9ca0883ff 100644 --- a/src/dotnet/commands/dotnet-clean/LocalizableStrings.cs +++ b/src/dotnet/commands/dotnet-clean/LocalizableStrings.cs @@ -12,14 +12,14 @@ public const string CmdOutputDir = "OUTPUT_DIR"; - public const string CmdOutputDirDescription = "Directory in which the build outputs have been placed"; + public const string CmdOutputDirDescription = "Directory in which the build outputs have been placed."; public const string CmdFramework = "FRAMEWORK"; - public const string CmdFrameworkDescription = "Clean a specific framework"; + public const string CmdFrameworkDescription = "Clean a specific framework."; public const string CmdConfiguration = "CONFIGURATION"; - public const string CmdConfigurationDescription = "Clean a specific configuration"; + public const string CmdConfigurationDescription = "Clean a specific configuration."; } } diff --git a/src/dotnet/commands/dotnet-help/HelpCommand.cs b/src/dotnet/commands/dotnet-help/HelpCommand.cs index 1b442211c..a6e521555 100644 --- a/src/dotnet/commands/dotnet-help/HelpCommand.cs +++ b/src/dotnet/commands/dotnet-help/HelpCommand.cs @@ -34,6 +34,7 @@ namespace Microsoft.DotNet.Tools.Help test {LocalizableStrings.TestDefinition} pack {LocalizableStrings.PackDefinition} migrate {LocalizableStrings.MigrateDefinition} + clean {LocalizableStrings.CleanDefinition} Project modification commands: add Add items to the project diff --git a/src/dotnet/commands/dotnet-help/LocalizableStrings.cs b/src/dotnet/commands/dotnet-help/LocalizableStrings.cs index 4cd4d3022..e0bcb37c0 100644 --- a/src/dotnet/commands/dotnet-help/LocalizableStrings.cs +++ b/src/dotnet/commands/dotnet-help/LocalizableStrings.cs @@ -59,5 +59,7 @@ public const string MsBuildDefinition = "msbuilds a project and all of its dependencies"; public const string VsTestDefinition = "Runs tests from the specified files"; + + public const string CleanDefinition = "Clean build output(s)"; } } diff --git a/src/dotnet/commands/dotnet-migrate/LocalizableStrings.cs b/src/dotnet/commands/dotnet-migrate/LocalizableStrings.cs index d614e4fbe..137080ec0 100644 --- a/src/dotnet/commands/dotnet-migrate/LocalizableStrings.cs +++ b/src/dotnet/commands/dotnet-migrate/LocalizableStrings.cs @@ -8,13 +8,10 @@ namespace Microsoft.DotNet.Tools.Migrate public const string CmdProjectArgument = "PROJECT_JSON/GLOBAL_JSON/SOLUTION_FILE/PROJECT_DIR"; public const string CmdProjectArgumentDescription = -@"The path to +@"The path to one of the following: - a project.json file to migrate. -or - a global.json file, it will migrate the folders specified in global.json. -or - a solution.sln file, it will migrate the projects referenced in the solution. -or - a directory to migrate, it will recursively search for project.json files to migrate. Defaults to current directory if nothing is specified."; diff --git a/src/dotnet/commands/dotnet-pack/LocalizableStrings.cs b/src/dotnet/commands/dotnet-pack/LocalizableStrings.cs index 2e4f12153..d1317b85f 100644 --- a/src/dotnet/commands/dotnet-pack/LocalizableStrings.cs +++ b/src/dotnet/commands/dotnet-pack/LocalizableStrings.cs @@ -2,29 +2,29 @@ { internal class LocalizableStrings { - public const string AppFullName = "pack"; + public const string AppFullName = ".NET Core NuGet Package Packer"; public const string AppDescription = "pack for msbuild"; public const string CmdOutputDir = "OUTPUT_DIR"; - public const string CmdOutputDirDescription = "Directory in which to place outputs"; + public const string CmdOutputDirDescription = "Directory in which to place built packages."; - public const string CmdNoBuildOptionDescription = "Do not build project before packing"; + public const string CmdNoBuildOptionDescription = "Skip building the project prior to packing. By default, the project will be built."; - public const string CmdIncludeSymbolsDescription = "Include PDBs along with the DLLs in the output folder"; + public const string CmdIncludeSymbolsDescription = "Include packages with symbols in addition to assembly (DLL) packages in output directory."; public const string CmdIncludeSourceDescription = "Include PDBs and source files. Source files go into the src folder in the resulting nuget package"; public const string CmdConfig = "CONFIGURATION"; - public const string CmdConfigDescription = "Configuration under which to build"; + public const string CmdConfigDescription = "Configuration to use for building the project. Default is \"Debug\"."; public const string CmdVersionSuffix = "VERSION_SUFFIX"; - public const string CmdVersionSuffixDescription = "Defines what `*` should be replaced with in version field in project.json"; + public const string CmdVersionSuffixDescription = "Defines the value for the $(VersionSuffix) property in the project."; - public const string CmdServiceableDescription = "Set the serviceable flag in the package"; + public const string CmdServiceableDescription = "Set the serviceable flag in the package. For more information, please see https://aka.ms/nupkgservicing."; public const string CmdArgumentProject = "PROJECT"; diff --git a/src/dotnet/commands/dotnet-publish/LocalizableStrings.cs b/src/dotnet/commands/dotnet-publish/LocalizableStrings.cs index d9e466dd9..620a7c950 100644 --- a/src/dotnet/commands/dotnet-publish/LocalizableStrings.cs +++ b/src/dotnet/commands/dotnet-publish/LocalizableStrings.cs @@ -12,22 +12,22 @@ public const string FrameworkOption = "FRAMEWORK"; - public const string FrameworkOptionDescription = "Target framework to publish for"; + public const string FrameworkOptionDescription = " Target framework to publish for. The target framework has to be specified in the project file."; public const string RuntimeOption = "RUNTIME_IDENTIFIER"; - public const string RuntimeOptionDescription = "Target runtime to publish for. The default is to publish a portable application."; + public const string RuntimeOptionDescription = "Publish the project for a given runtime. This is used when creating self-contained deployment. Default is to publish a framework-dependented app."; public const string OutputOption = "OUTPUT_DIR"; - public const string OutputOptionDescription = "Path in which to publish the app"; + public const string OutputOptionDescription = "Output directory in which to place the published artifacts."; public const string ConfigurationOption = "CONFIGURATION"; - public const string ConfigurationOptionDescription = "Configuration under which to build"; + public const string ConfigurationOptionDescription = "Configuration to use for building the project. Default is \"Debug\"."; public const string VersionSuffixOption = "VERSION_SUFFIX"; - public const string VersionSuffixOptionDescription = "Defines the value for the $(VersionSuffix) property in the project"; + public const string VersionSuffixOptionDescription = "Defines the value for the $(VersionSuffix) property in the project."; } } diff --git a/src/dotnet/commands/dotnet-restore/LocalizableStrings.cs b/src/dotnet/commands/dotnet-restore/LocalizableStrings.cs index dc9cf6d96..e3a6f860d 100644 --- a/src/dotnet/commands/dotnet-restore/LocalizableStrings.cs +++ b/src/dotnet/commands/dotnet-restore/LocalizableStrings.cs @@ -2,11 +2,11 @@ { internal class LocalizableStrings { - public const string AppFullName = "restore"; + public const string AppFullName = ".NET dependency restorer"; public const string AppDescription = "restore for msbuild"; - public const string CmdArgument = "root"; + public const string CmdArgument = "project"; public const string CmdArgumentDescription = "Optional path to a project file or MSBuild arguments."; diff --git a/src/dotnet/commands/dotnet-run/LocalizableStrings.cs b/src/dotnet/commands/dotnet-run/LocalizableStrings.cs index a2c08f750..0a1501fa6 100644 --- a/src/dotnet/commands/dotnet-run/LocalizableStrings.cs +++ b/src/dotnet/commands/dotnet-run/LocalizableStrings.cs @@ -6,11 +6,11 @@ public const string AppDescription = "Command used to run .NET apps"; - public const string CommandOptionConfigurationDescription = "Configuration under which to build"; + public const string CommandOptionConfigurationDescription = "Configuration to use for building the project. Default is \"Debug\"."; public const string CommandOptionFramework = "FRAMEWORK"; - public const string CommandOptionFrameworkDescription = "Compile a specific framework"; + public const string CommandOptionFrameworkDescription = "Build and run the specified framework. The framework has to be specified in the project file. "; public const string CommandOptionProjectDescription = "The path to the project file to run (defaults to the current directory if there is only one project)."; @@ -43,5 +43,7 @@ public const string RunCommandInvalidOperationException3 = "Specify which project file to use because this "; public const string RunCommandInvalidOperationException4 = "contains more than one project file."; + + public const string RunCommandAdditionalArgsHelpText = "Arguments passed to the application that is being run."; } } \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-run/Program.cs b/src/dotnet/commands/dotnet-run/Program.cs index 57bf074cb..b1bb77560 100644 --- a/src/dotnet/commands/dotnet-run/Program.cs +++ b/src/dotnet/commands/dotnet-run/Program.cs @@ -19,7 +19,7 @@ namespace Microsoft.DotNet.Tools.Run app.Description = LocalizableStrings.AppDescription; app.HandleResponseFiles = true; app.AllowArgumentSeparator = true; - app.ArgumentSeparatorHelpText = HelpMessageStrings.MSBuildAdditionalArgsHelpText; + app.ArgumentSeparatorHelpText = $"{HelpMessageStrings.MSBuildAdditionalArgsHelpText}\n{LocalizableStrings.RunCommandAdditionalArgsHelpText}"; app.HelpOption("-h|--help"); CommandOption configuration = app.Option(