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")
|
.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 targeting a specific framework",
|
LocalizableStrings.CmdFrameworkDescription,
|
||||||
Accept.ExactlyOneArgument()
|
Accept.ExactlyOneArgument()
|
||||||
.With(name: "FRAMEWORK")
|
.With(name: "FRAMEWORK")
|
||||||
.ForwardAs(o => $"--framework {o.Arguments.Single()}")),
|
.ForwardAs(o => $"--framework {o.Arguments.Single()}")),
|
||||||
|
@ -61,8 +61,10 @@ namespace Microsoft.DotNet.Cli
|
||||||
description: Tools.Add.ProjectToProjectReference.LocalizableStrings.AppHelpText),
|
description: Tools.Add.ProjectToProjectReference.LocalizableStrings.AppHelpText),
|
||||||
CommonOptions.HelpOption(),
|
CommonOptions.HelpOption(),
|
||||||
Create.Option("-f|--framework",
|
Create.Option("-f|--framework",
|
||||||
"Add reference only when targeting a specific framework",
|
LocalizableStrings.CmdFrameworkDescription,
|
||||||
Accept.AnyOneOf(Suggest.TargetFrameworksFromProjectFile)
|
Accept
|
||||||
|
.ExactlyOneArgument()
|
||||||
|
.WithSuggestionsFrom(_ => Suggest.TargetFrameworksFromProjectFile())
|
||||||
.With(name: "FRAMEWORK"))),
|
.With(name: "FRAMEWORK"))),
|
||||||
CommonOptions.HelpOption());
|
CommonOptions.HelpOption());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue