help text updates

This commit is contained in:
Jon Sequeira 2017-03-14 10:33:58 -07:00
parent 2c96d8e8b9
commit 96683c1421
8 changed files with 31 additions and 17 deletions

View file

@ -18,7 +18,7 @@ namespace Microsoft.DotNet.Cli
public static Option VerbosityOption() => public static Option VerbosityOption() =>
Create.Option( Create.Option(
"-v|--verbosity", "-v|--verbosity",
"Set the verbosity level of the command. Allowed values are q[uiet],<EFBFBD>m[inimal],<2C>n[ormal],<2C>d[etailed], and<6E>diag[nostic]", "Set the verbosity level of the command. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]",
Accept.AnyOneOf( Accept.AnyOneOf(
"q", "quiet", "q", "quiet",
"m", "minimal", "m", "minimal",

View file

@ -20,12 +20,16 @@ namespace Microsoft.DotNet.Cli
".NET Add Command", ".NET Add Command",
Accept.ExactlyOneArgument() Accept.ExactlyOneArgument()
.ExistingFilesOnly() .ExistingFilesOnly()
.DefaultToCurrentDirectory(), .DefaultToCurrentDirectory()
.With(name: "PROJECT",
description: "The project file to operate on. If a file is not specified, the command will search the current directory for one."),
Create.Command( Create.Command(
"package", "package",
".NET Add Package reference Command", ".NET Add Package reference Command",
Accept.ExactlyOneArgument(errorMessage: o => LocalizableStrings.SpecifyExactlyOnePackageReference) Accept.ExactlyOneArgument(errorMessage: o => LocalizableStrings.SpecifyExactlyOnePackageReference)
.WithSuggestionsFrom(QueryNuGet), .WithSuggestionsFrom(QueryNuGet)
.With(name: "PACKAGE_NAME",
description: "Package references to add"),
CommonOptions.HelpOption(), CommonOptions.HelpOption(),
Create.Option("-v|--version", Create.Option("-v|--version",
"Version for the package to be added.", "Version for the package to be added.",
@ -52,7 +56,7 @@ namespace Microsoft.DotNet.Cli
Create.Command( Create.Command(
"reference", "reference",
"Command to add project to project reference", "Command to add project to project reference",
Accept.OneOrMoreArguments(), Accept.OneOrMoreArguments(),
CommonOptions.HelpOption(), CommonOptions.HelpOption(),
Create.Option("-f|--framework", Create.Option("-f|--framework",
"Add reference only when targetting a specific framework", "Add reference only when targetting a specific framework",

View file

@ -13,7 +13,10 @@ namespace Microsoft.DotNet.Cli
Create.Command( Create.Command(
"build", "build",
LocalizableStrings.AppFullName, LocalizableStrings.AppFullName,
Accept.ZeroOrMoreArguments(), Accept.ZeroOrMoreArguments()
.With(name: "PROJECT",
description:
"The MSBuild project file to build. If a project file is not specified, MSBuild searches the current working directory for a file that has a file extension that ends in `proj` and uses that file."),
CommonOptions.HelpOption(), CommonOptions.HelpOption(),
Create.Option( Create.Option(
"-o|--output", "-o|--output",

View file

@ -2,6 +2,8 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information. // Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Microsoft.DotNet.Cli.CommandLine; using Microsoft.DotNet.Cli.CommandLine;
using Microsoft.DotNet.Tools;
using LocalizableStrings = Microsoft.DotNet.Tools.Sln.LocalizableStrings;
namespace Microsoft.DotNet.Cli namespace Microsoft.DotNet.Cli
{ {
@ -13,18 +15,23 @@ namespace Microsoft.DotNet.Cli
".NET modify solution file command", ".NET modify solution file command",
Accept.ExactlyOneArgument() Accept.ExactlyOneArgument()
.DefaultToCurrentDirectory() .DefaultToCurrentDirectory()
.With(name: "SLN_FILE"), .With(name: "SLN_FILE",
description: CommonLocalizableStrings.ArgumentsSolutionDescription),
CommonOptions.HelpOption(), CommonOptions.HelpOption(),
Create.Command("add", Create.Command("add",
".NET Add project(s) to a solution file Command", ".NET Add project(s) to a solution file Command",
Accept.OneOrMoreArguments(), Accept.OneOrMoreArguments()
.With(name: "args",
description: LocalizableStrings.AddSubcommandHelpText),
CommonOptions.HelpOption()), CommonOptions.HelpOption()),
Create.Command("list", Create.Command("list",
"List all projects in the solution.", "List all projects in the solution.",
CommonOptions.HelpOption()), CommonOptions.HelpOption()),
Create.Command("remove", Create.Command("remove",
"Remove the specified project(s) from the solution. The project is not impacted.", "Remove the specified project(s) from the solution. The project is not impacted.",
Accept.OneOrMoreArguments(), Accept.OneOrMoreArguments()
.With(name: "args",
description: LocalizableStrings.RemoveSubcommandHelpText),
CommonOptions.HelpOption())); CommonOptions.HelpOption()));
} }
} }

View file

@ -11,7 +11,9 @@ namespace Microsoft.DotNet.Cli
Create.Command( Create.Command(
"test", "test",
LocalizableStrings.AppFullName, LocalizableStrings.AppFullName,
Accept.ZeroOrMoreArguments(), Accept.ZeroOrMoreArguments()
.With(name: LocalizableStrings.CmdArgProject,
description: LocalizableStrings.CmdArgDescription),
CommonOptions.HelpOption(), CommonOptions.HelpOption(),
Create.Option( Create.Option(
"-s|--settings", "-s|--settings",

View file

@ -40,7 +40,7 @@
<PackageReference Include="Microsoft.Win32.Registry" Version="4.3.0" /> <PackageReference Include="Microsoft.Win32.Registry" Version="4.3.0" />
<PackageReference Include="Microsoft.Build" Version="$(CLI_MSBuild_Version)" /> <PackageReference Include="Microsoft.Build" Version="$(CLI_MSBuild_Version)" />
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="$(PlatformAbstractionsVersion)" /> <PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="$(PlatformAbstractionsVersion)" />
<PackageReference Include="Microsoft.DotNet.Cli.CommandLine" Version="0.1.0-alpha-98" /> <PackageReference Include="Microsoft.DotNet.Cli.CommandLine" Version="0.1.0-alpha-102" />
<PackageReference Include="Microsoft.TemplateEngine.Abstractions" Version="$(TemplateEngineVersion)" /> <PackageReference Include="Microsoft.TemplateEngine.Abstractions" Version="$(TemplateEngineVersion)" />
<PackageReference Include="Microsoft.TemplateEngine.Cli" Version="$(TemplateEngineVersion)" /> <PackageReference Include="Microsoft.TemplateEngine.Cli" Version="$(TemplateEngineVersion)" />
<PackageReference Include="Microsoft.TemplateEngine.Orchestrator.RunnableProjects" Version="$(TemplateEngineVersion)" /> <PackageReference Include="Microsoft.TemplateEngine.Orchestrator.RunnableProjects" Version="$(TemplateEngineVersion)" />

View file

@ -17,16 +17,14 @@ namespace Microsoft.DotNet.Cli.Sln.Add.Tests
{ {
private string HelpText = @".NET Add project(s) to a solution file Command private string HelpText = @".NET Add project(s) to a solution file Command
Usage: dotnet sln <SLN_FILE> add [options] [args] Usage: dotnet sln <SLN_FILE> add [options] <args>
Arguments: Arguments:
<SLN_FILE> Solution file to operate on. If not specified, the command will search the current directory for one. <SLN_FILE> Solution file to operate on. If not specified, the command will search the current directory for one.
<args> Add one or more specified projects to the solution.
Options: Options:
-h|--help Show help information -h, --help Show help information
Additional Arguments:
Add one or more specified projects to the solution.
"; ";
private ITestOutputHelper _output; private ITestOutputHelper _output;

View file

@ -42,6 +42,6 @@
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" /> <PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
<PackageReference Include="xunit.netcore.extensions" Version="1.0.0-prerelease-00206" /> <PackageReference Include="xunit.netcore.extensions" Version="1.0.0-prerelease-00206" />
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="$(PlatformAbstractionsVersion)" /> <PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="$(PlatformAbstractionsVersion)" />
<PackageReference Include="Microsoft.DotNet.Cli.CommandLine" Version="0.1.0-alpha-98" /> <PackageReference Include="Microsoft.DotNet.Cli.CommandLine" Version="0.1.0-alpha-102" />
</ItemGroup> </ItemGroup>
</Project> </Project>