fix publish parser args validation
This commit is contained in:
parent
46b799af01
commit
ea899f236e
1 changed files with 4 additions and 2 deletions
|
@ -16,12 +16,14 @@ namespace Microsoft.DotNet.Cli
|
|||
CommonOptions.HelpOption(),
|
||||
Create.Option("-f|--framework",
|
||||
"Target framework to publish for. The target framework has to be specified in the project file.",
|
||||
Accept.WithSuggestionsFrom(_ => Suggest.TargetFrameworksFromProjectFile())
|
||||
Accept.ExactlyOneArgument
|
||||
.WithSuggestionsFrom(_ => Suggest.TargetFrameworksFromProjectFile())
|
||||
.With(name: "FRAMEWORK")
|
||||
.ForwardAs(o => $"/p:TargetFramework={o.Arguments.Single()}")),
|
||||
Create.Option("-r|--runtime",
|
||||
"Publish the project for a given runtime. This is used when creating self-contained deployment. Default is to publish a framework-dependent app.",
|
||||
Accept.WithSuggestionsFrom(_ => Suggest.RunTimesFromProjectFile())
|
||||
Accept.ExactlyOneArgument
|
||||
.WithSuggestionsFrom(_ => Suggest.RunTimesFromProjectFile())
|
||||
.With(name: "RUNTIME_IDENTIFIER")
|
||||
.ForwardAs(o => $"/p:RuntimeIdentifier={o.Arguments.Single()}")),
|
||||
Create.Option("-o|--output",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue