loc spelling error and other fixes
This commit is contained in:
parent
d3a101ebad
commit
bbc2722cb7
4 changed files with 27 additions and 20 deletions
|
@ -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());
|
||||
|
|
|
@ -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,19 +13,26 @@ 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),
|
||||
CommonOptions.HelpOption(),
|
||||
Create.Option("-f|--framework",
|
||||
"Remove reference only when targetting a specific framework",
|
||||
Accept.ExactlyOneArgument()
|
||||
.With(name: "FRAMEWORK"))));
|
||||
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 targeting a specific framework",
|
||||
Accept.ExactlyOneArgument()
|
||||
.With(name: "FRAMEWORK"))));
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
<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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue