adjust parser constraints for dotnet add
This commit is contained in:
parent
9d1adadb9d
commit
ae312b7965
1 changed files with 6 additions and 4 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 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<string> QueryNuGet(string match)
|
||||
|
|
Loading…
Reference in a new issue