fix publish parser args validation

This commit is contained in:
Jon Sequeira 2017-03-09 13:19:46 -08:00
parent 46b799af01
commit ea899f236e

View file

@ -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",