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")
|
.With(name: "VERSION")
|
||||||
.ForwardAs(o => $"--version {o.Arguments.Single()}")),
|
.ForwardAs(o => $"--version {o.Arguments.Single()}")),
|
||||||
Create.Option("-f|--framework",
|
Create.Option("-f|--framework",
|
||||||
"Add reference only when targetting a specific framework",
|
"Add reference only when targeting a specific framework",
|
||||||
Accept.ExactlyOneArgument()
|
Accept.ExactlyOneArgument()
|
||||||
.With(name: "FRAMEWORK")
|
.With(name: "FRAMEWORK")
|
||||||
.ForwardAs(o => $"--framework {o.Arguments.Single()}")),
|
.ForwardAs(o => $"--framework {o.Arguments.Single()}")),
|
||||||
|
@ -59,7 +59,7 @@ namespace Microsoft.DotNet.Cli
|
||||||
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 targeting a specific framework",
|
||||||
Accept.AnyOneOf(Suggest.TargetFrameworksFromProjectFile)
|
Accept.AnyOneOf(Suggest.TargetFrameworksFromProjectFile)
|
||||||
.With(name: "FRAMEWORK"))),
|
.With(name: "FRAMEWORK"))),
|
||||||
CommonOptions.HelpOption());
|
CommonOptions.HelpOption());
|
||||||
|
|
|
@ -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.Remove.ProjectToProjectReference.LocalizableStrings;
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Cli
|
namespace Microsoft.DotNet.Cli
|
||||||
{
|
{
|
||||||
|
@ -11,19 +13,26 @@ namespace Microsoft.DotNet.Cli
|
||||||
Create.Command("remove",
|
Create.Command("remove",
|
||||||
".NET Remove Command",
|
".NET Remove Command",
|
||||||
Accept.ZeroOrOneArgument()
|
Accept.ZeroOrOneArgument()
|
||||||
.With(name: "PROJECT")
|
.With(name: "PROJECT",
|
||||||
|
description: CommonLocalizableStrings.ArgumentsProjectDescription)
|
||||||
.DefaultToCurrentDirectory(),
|
.DefaultToCurrentDirectory(),
|
||||||
CommonOptions.HelpOption(),
|
CommonOptions.HelpOption(),
|
||||||
Create.Command("package",
|
Create.Command("package",
|
||||||
"Command to remove package reference.",
|
LocalizableStrings.AppFullName,
|
||||||
CommonOptions.HelpOption()),
|
CommonOptions.HelpOption()),
|
||||||
Create.Command("reference",
|
Create.Command(
|
||||||
"Command to remove project to project reference",
|
"reference",
|
||||||
Accept.AnyOneOf(Suggest.ProjectReferencesFromProjectFile),
|
LocalizableStrings.AppFullName,
|
||||||
CommonOptions.HelpOption(),
|
Accept
|
||||||
Create.Option("-f|--framework",
|
.OneOrMoreArguments()
|
||||||
"Remove reference only when targetting a specific framework",
|
.WithSuggestionsFrom(_ => Suggest.ProjectReferencesFromProjectFile())
|
||||||
Accept.ExactlyOneArgument()
|
.With(name: "args",
|
||||||
.With(name: "FRAMEWORK"))));
|
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));
|
throw new ArgumentNullException(nameof(appliedCommand));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_appliedCommand.Arguments.Count == 0)
|
if (appliedCommand.Arguments.Count == 0)
|
||||||
{
|
{
|
||||||
throw new GracefulException(CommonLocalizableStrings.SpecifyAtLeastOneReferenceToRemove);
|
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
|
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:
|
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:
|
Options:
|
||||||
-h|--help Show help information
|
-h, --help Show help information
|
||||||
-f|--framework <FRAMEWORK> Remove reference only when targeting a specific framework
|
-f, --framework <FRAMEWORK> Remove reference only when targeting a specific framework
|
||||||
|
|
||||||
Additional Arguments:
|
|
||||||
Project to project references to remove
|
|
||||||
";
|
";
|
||||||
|
|
||||||
const string FrameworkNet451Arg = "-f net451";
|
const string FrameworkNet451Arg = "-f net451";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue