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() =>
Create.Option(
"-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(
"q", "quiet",
"m", "minimal",

View file

@ -20,12 +20,16 @@ namespace Microsoft.DotNet.Cli
".NET Add Command",
Accept.ExactlyOneArgument()
.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(
"package",
".NET Add Package reference Command",
Accept.ExactlyOneArgument(errorMessage: o => LocalizableStrings.SpecifyExactlyOnePackageReference)
.WithSuggestionsFrom(QueryNuGet),
.WithSuggestionsFrom(QueryNuGet)
.With(name: "PACKAGE_NAME",
description: "Package references to add"),
CommonOptions.HelpOption(),
Create.Option("-v|--version",
"Version for the package to be added.",
@ -52,7 +56,7 @@ namespace Microsoft.DotNet.Cli
Create.Command(
"reference",
"Command to add project to project reference",
Accept.OneOrMoreArguments(),
Accept.OneOrMoreArguments(),
CommonOptions.HelpOption(),
Create.Option("-f|--framework",
"Add reference only when targetting a specific framework",

View file

@ -13,7 +13,10 @@ namespace Microsoft.DotNet.Cli
Create.Command(
"build",
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(),
Create.Option(
"-o|--output",

View file

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

View file

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

View file

@ -40,7 +40,7 @@
<PackageReference Include="Microsoft.Win32.Registry" Version="4.3.0" />
<PackageReference Include="Microsoft.Build" Version="$(CLI_MSBuild_Version)" />
<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.Cli" 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
Usage: dotnet sln <SLN_FILE> add [options] [args]
Usage: dotnet sln <SLN_FILE> add [options] <args>
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:
-h|--help Show help information
Additional Arguments:
Add one or more specified projects to the solution.
-h, --help Show help information
";
private ITestOutputHelper _output;

View file

@ -42,6 +42,6 @@
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
<PackageReference Include="xunit.netcore.extensions" Version="1.0.0-prerelease-00206" />
<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>
</Project>