loc spelling error and other fixes

This commit is contained in:
Jon Sequeira 2017-03-14 23:13:59 -07:00
parent d3a101ebad
commit bbc2722cb7
4 changed files with 27 additions and 20 deletions

View file

@ -37,7 +37,7 @@ namespace Microsoft.DotNet.Cli
.With(name: "VERSION")
.ForwardAs(o => $"--version {o.Arguments.Single()}")),
Create.Option("-f|--framework",
"Add reference only when targetting a specific framework",
"Add reference only when targeting a specific framework",
Accept.ExactlyOneArgument()
.With(name: "FRAMEWORK")
.ForwardAs(o => $"--framework {o.Arguments.Single()}")),
@ -59,7 +59,7 @@ namespace Microsoft.DotNet.Cli
Accept.OneOrMoreArguments(),
CommonOptions.HelpOption(),
Create.Option("-f|--framework",
"Add reference only when targetting a specific framework",
"Add reference only when targeting a specific framework",
Accept.AnyOneOf(Suggest.TargetFrameworksFromProjectFile)
.With(name: "FRAMEWORK"))),
CommonOptions.HelpOption());

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.Remove.ProjectToProjectReference.LocalizableStrings;
namespace Microsoft.DotNet.Cli
{
@ -11,18 +13,25 @@ namespace Microsoft.DotNet.Cli
Create.Command("remove",
".NET Remove Command",
Accept.ZeroOrOneArgument()
.With(name: "PROJECT")
.With(name: "PROJECT",
description: CommonLocalizableStrings.ArgumentsProjectDescription)
.DefaultToCurrentDirectory(),
CommonOptions.HelpOption(),
Create.Command("package",
"Command to remove package reference.",
LocalizableStrings.AppFullName,
CommonOptions.HelpOption()),
Create.Command("reference",
"Command to remove project to project reference",
Accept.AnyOneOf(Suggest.ProjectReferencesFromProjectFile),
Create.Command(
"reference",
LocalizableStrings.AppFullName,
Accept
.OneOrMoreArguments()
.WithSuggestionsFrom(_ => Suggest.ProjectReferencesFromProjectFile())
.With(name: "args",
description: LocalizableStrings.AppHelpText),
CommonOptions.HelpOption(),
Create.Option("-f|--framework",
"Remove reference only when targetting a specific framework",
Create.Option(
"-f|--framework",
"Remove reference only when targeting a specific framework",
Accept.ExactlyOneArgument()
.With(name: "FRAMEWORK"))));
}

View file

@ -22,7 +22,7 @@ namespace Microsoft.DotNet.Tools.Remove.ProjectToProjectReference
throw new ArgumentNullException(nameof(appliedCommand));
}
if (_appliedCommand.Arguments.Count == 0)
if (appliedCommand.Arguments.Count == 0)
{
throw new GracefulException(CommonLocalizableStrings.SpecifyAtLeastOneReferenceToRemove);
}

View file

@ -15,17 +15,15 @@ namespace Microsoft.DotNet.Cli.Remove.Reference.Tests
{
private const string HelpText = @".NET Remove Project to Project reference Command
Usage: dotnet remove <PROJECT> reference [options] [args]
Usage: dotnet remove <PROJECT> reference [options] <args>
Arguments:
<PROJECT> The project file to operate on. If a file is not specified, the command will search the current directory for one.
<args> Project to project references to remove
Options:
-h|--help Show help information
-f|--framework <FRAMEWORK> Remove reference only when targeting a specific framework
Additional Arguments:
Project to project references to remove
-h, --help Show help information
-f, --framework <FRAMEWORK> Remove reference only when targeting a specific framework
";
const string FrameworkNet451Arg = "-f net451";