From ae312b796553f982b1d1606509e0531b9a7519bd Mon Sep 17 00:00:00 2001 From: jonsequitur Date: Wed, 15 Mar 2017 19:09:54 -0700 Subject: [PATCH] adjust parser constraints for dotnet add --- src/dotnet/commands/dotnet-add/AddCommandParser.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/dotnet/commands/dotnet-add/AddCommandParser.cs b/src/dotnet/commands/dotnet-add/AddCommandParser.cs index 781ffb450..645fc652f 100644 --- a/src/dotnet/commands/dotnet-add/AddCommandParser.cs +++ b/src/dotnet/commands/dotnet-add/AddCommandParser.cs @@ -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 targeting a specific framework", + LocalizableStrings.CmdFrameworkDescription, Accept.ExactlyOneArgument() .With(name: "FRAMEWORK") .ForwardAs(o => $"--framework {o.Arguments.Single()}")), @@ -61,9 +61,11 @@ namespace Microsoft.DotNet.Cli description: Tools.Add.ProjectToProjectReference.LocalizableStrings.AppHelpText), CommonOptions.HelpOption(), Create.Option("-f|--framework", - "Add reference only when targeting a specific framework", - Accept.AnyOneOf(Suggest.TargetFrameworksFromProjectFile) - .With(name: "FRAMEWORK"))), + LocalizableStrings.CmdFrameworkDescription, + Accept + .ExactlyOneArgument() + .WithSuggestionsFrom(_ => Suggest.TargetFrameworksFromProjectFile()) + .With(name: "FRAMEWORK"))), CommonOptions.HelpOption()); public static IEnumerable QueryNuGet(string match)