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
This commit is contained in:
Zlatko Knezevic 2016-12-15 23:11:18 -08:00 committed by Livar Cunha
parent 9c3141b63f
commit b7f3e39413
10 changed files with 30 additions and 28 deletions

View file

@ -6,19 +6,19 @@
public const string AppFullName = ".NET Builder"; 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 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 FrameworkOptionName = "FRAMEWORK";
public const string NoDependenciesOptionDescription = "Set this flag to ignore project to project references and only build the root project"; 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"; public const string OutputOptionName = "OUTPUT_DIR";

View file

@ -12,14 +12,14 @@
public const string CmdOutputDir = "OUTPUT_DIR"; 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 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 CmdConfiguration = "CONFIGURATION";
public const string CmdConfigurationDescription = "Clean a specific configuration"; public const string CmdConfigurationDescription = "Clean a specific configuration.";
} }
} }

View file

@ -34,6 +34,7 @@ namespace Microsoft.DotNet.Tools.Help
test {LocalizableStrings.TestDefinition} test {LocalizableStrings.TestDefinition}
pack {LocalizableStrings.PackDefinition} pack {LocalizableStrings.PackDefinition}
migrate {LocalizableStrings.MigrateDefinition} migrate {LocalizableStrings.MigrateDefinition}
clean {LocalizableStrings.CleanDefinition}
Project modification commands: Project modification commands:
add Add items to the project add Add items to the project

View file

@ -59,5 +59,7 @@
public const string MsBuildDefinition = "msbuilds a project and all of its dependencies"; 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 VsTestDefinition = "Runs tests from the specified files";
public const string CleanDefinition = "Clean build output(s)";
} }
} }

View file

@ -8,13 +8,10 @@ namespace Microsoft.DotNet.Tools.Migrate
public const string CmdProjectArgument = "PROJECT_JSON/GLOBAL_JSON/SOLUTION_FILE/PROJECT_DIR"; public const string CmdProjectArgument = "PROJECT_JSON/GLOBAL_JSON/SOLUTION_FILE/PROJECT_DIR";
public const string CmdProjectArgumentDescription = public const string CmdProjectArgumentDescription =
@"The path to @"The path to one of the following:
- a project.json file to migrate. - a project.json file to migrate.
or
- a global.json file, it will migrate the folders specified in global.json. - 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. - 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. - a directory to migrate, it will recursively search for project.json files to migrate.
Defaults to current directory if nothing is specified."; Defaults to current directory if nothing is specified.";

View file

@ -2,29 +2,29 @@
{ {
internal class LocalizableStrings 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 AppDescription = "pack for msbuild";
public const string CmdOutputDir = "OUTPUT_DIR"; 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 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 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 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"; public const string CmdArgumentProject = "PROJECT";

View file

@ -12,22 +12,22 @@
public const string FrameworkOption = "FRAMEWORK"; 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 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 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 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 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.";
} }
} }

View file

@ -2,11 +2,11 @@
{ {
internal class LocalizableStrings 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 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."; public const string CmdArgumentDescription = "Optional path to a project file or MSBuild arguments.";

View file

@ -6,11 +6,11 @@
public const string AppDescription = "Command used to run .NET apps"; 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 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)."; 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 RunCommandInvalidOperationException3 = "Specify which project file to use because this ";
public const string RunCommandInvalidOperationException4 = "contains more than one project file."; public const string RunCommandInvalidOperationException4 = "contains more than one project file.";
public const string RunCommandAdditionalArgsHelpText = "Arguments passed to the application that is being run.";
} }
} }

View file

@ -19,7 +19,7 @@ namespace Microsoft.DotNet.Tools.Run
app.Description = LocalizableStrings.AppDescription; app.Description = LocalizableStrings.AppDescription;
app.HandleResponseFiles = true; app.HandleResponseFiles = true;
app.AllowArgumentSeparator = true; app.AllowArgumentSeparator = true;
app.ArgumentSeparatorHelpText = HelpMessageStrings.MSBuildAdditionalArgsHelpText; app.ArgumentSeparatorHelpText = $"{HelpMessageStrings.MSBuildAdditionalArgsHelpText}\n{LocalizableStrings.RunCommandAdditionalArgsHelpText}";
app.HelpOption("-h|--help"); app.HelpOption("-h|--help");
CommandOption configuration = app.Option( CommandOption configuration = app.Option(