Resolve build breaks

This commit is contained in:
Piotr Puszkiewicz 2017-03-10 17:52:40 -08:00
parent 23d4fb32f3
commit 3bdfe28765
7 changed files with 41 additions and 36 deletions

View file

@ -30,7 +30,7 @@ namespace Microsoft.DotNet.Cli
Create.Option(
"-f|--framework",
"Target framework to publish for. The target framework has to be specified in the project file.",
Accept.ExactlyOneArgument
Accept.ExactlyOneArgument()
.WithSuggestionsFrom(_ => Suggest.TargetFrameworksFromProjectFile())
.With(name: "FRAMEWORK")
.ForwardAs(o => $"/p:TargetFramework={o.Arguments.Single()}"));
@ -39,7 +39,7 @@ namespace Microsoft.DotNet.Cli
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.ExactlyOneArgument
Accept.ExactlyOneArgument()
.WithSuggestionsFrom(_ => Suggest.RunTimesFromProjectFile())
.With(name: "RUNTIME_IDENTIFIER")
.ForwardAs(o => $"/p:RuntimeIdentifier={o.Arguments.Single()}"));
@ -48,7 +48,7 @@ namespace Microsoft.DotNet.Cli
Create.Option(
"-c|--configuration",
"Configuration to use for building the project. Default for most projects is \"Debug\".",
Accept.ExactlyOneArgument
Accept.ExactlyOneArgument()
.With(name: "CONFIGURATION")
.WithSuggestionsFrom("DEBUG", "RELEASE")
.ForwardAs(o => $"/p:Configuration={o.Arguments.Single()}"));
@ -57,7 +57,7 @@ namespace Microsoft.DotNet.Cli
Create.Option(
"--version-suffix",
"Defines the value for the $(VersionSuffix) property in the project.",
Accept.ExactlyOneArgument
Accept.ExactlyOneArgument()
.With(name: "VERSION_SUFFIX")
.ForwardAs(o => $"/p:VersionSuffix={o.Arguments.Single()}"));

View file

@ -13,12 +13,12 @@ namespace Microsoft.DotNet.Cli
Create.Command(
"cache",
LocalizableStrings.AppDescription,
Accept.ZeroOrMoreArguments,
Accept.ZeroOrMoreArguments(),
CommonOptions.HelpOption(),
Create.Option(
"-e|--entries",
LocalizableStrings.ProjectEntryDescription,
Accept.OneOrMoreArguments
Accept.OneOrMoreArguments()
.With(name: LocalizableStrings.ProjectEntries)
.ForwardAs(o =>
{
@ -34,7 +34,7 @@ namespace Microsoft.DotNet.Cli
Create.Option(
"--framework-version",
LocalizableStrings.FrameworkVersionOptionDescription,
Accept.ExactlyOneArgument
Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.FrameworkVersionOption)
.ForwardAs(o => $"/p:FX_Version={o.Arguments.Single()}")),
CommonOptions.RuntimeOption(),
@ -42,24 +42,24 @@ namespace Microsoft.DotNet.Cli
Create.Option(
"-o|--output",
LocalizableStrings.OutputOptionDescription,
Accept.ExactlyOneArgument
Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.OutputOption)
.ForwardAs(o => $"/p:ComposeDir={o.Arguments.Single()}")),
Create.Option(
"-w|--working-dir",
LocalizableStrings.IntermediateWorkingDirOptionDescription,
Accept.ExactlyOneArgument
Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.IntermediateWorkingDirOption)
.ForwardAs(o => $"/p:ComposeWorkingDir={o.Arguments.Single()}")),
Create.Option(
"--preserve-working-dir",
LocalizableStrings.PreserveIntermediateWorkingDirOptionDescription,
Accept.NoArguments
Accept.NoArguments()
.ForwardAs(o => $"/p:PreserveComposeWorkingDir=true")),
Create.Option(
"--skip-optimization",
LocalizableStrings.SkipOptimizationOptionDescription,
Accept.NoArguments
Accept.NoArguments()
.ForwardAs("/p:SkipOptimization=true")),
CommonOptions.VerbosityOption());
}

View file

@ -13,7 +13,7 @@ namespace Microsoft.DotNet.Cli
Create.Command(
"clean",
LocalizableStrings.AppFullName,
Accept.ZeroOrMoreArguments,
Accept.ZeroOrMoreArguments(),
CommonOptions.HelpOption(),
Create.Option("-o|--output",
LocalizableStrings.CmdOutputDirDescription,

View file

@ -14,7 +14,7 @@ namespace Microsoft.DotNet.Cli
Create.Command(
"migrate",
".NET Migrate Command",
Accept.ZeroOrOneArgument
Accept.ZeroOrOneArgument()
.MaterializeAs(o =>
{
return new MigrateCommand(

View file

@ -13,28 +13,32 @@ namespace Microsoft.DotNet.Cli
Create.Command(
"pack",
LocalizableStrings.AppDescription,
Accept.ZeroOrMoreArguments,
Accept.ZeroOrMoreArguments(),
CommonOptions.HelpOption(),
Create.Option(
"-o|--output",
LocalizableStrings.CmdOutputDirDescription,
Accept.ExactlyOneArgument()
Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.CmdOutputDir)
.ForwardAs(o => $"/p:PackageOutputPath={o.Arguments.Single()}")),
Create.Option("--no-build",
LocalizableStrings.CmdNoBuildOptionDescription,
Accept.NoArguments.ForwardAs("/p:NoBuild=true")),
Create.Option("--include-symbols",
LocalizableStrings.CmdIncludeSymbolsDescription,
Accept.NoArguments.ForwardAs("/p:IncludeSymbols=true")),
Create.Option("--include-source",
LocalizableStrings.CmdIncludeSourceDescription,
Accept.NoArguments.ForwardAs("/p:IncludeSource=true")),
Create.Option(
"--no-build",
LocalizableStrings.CmdNoBuildOptionDescription,
Accept.NoArguments().ForwardAs("/p:NoBuild=true")),
Create.Option(
"--include-symbols",
LocalizableStrings.CmdIncludeSymbolsDescription,
Accept.NoArguments().ForwardAs("/p:IncludeSymbols=true")),
Create.Option(
"--include-source",
LocalizableStrings.CmdIncludeSourceDescription,
Accept.NoArguments().ForwardAs("/p:IncludeSource=true")),
CommonOptions.ConfigurationOption(),
CommonOptions.VersionSuffixOption(),
Create.Option("-s|--serviceable",
LocalizableStrings.CmdServiceableDescription,
Accept.NoArguments.ForwardAs("/p:Serviceable=true")),
Create.Option(
"-s|--serviceable",
LocalizableStrings.CmdServiceableDescription,
Accept.NoArguments().ForwardAs("/p:Serviceable=true")),
CommonOptions.VerbosityOption());
}
}

View file

@ -24,6 +24,7 @@ namespace Microsoft.DotNet.Cli
.With(name: LocalizableStrings.OutputOption)
.ForwardAs(o => $"/p:PublishDir={o.Arguments.Single()}")),
CommonOptions.ConfigurationOption(),
Create.Option(
"--filter",
LocalizableStrings.FilterProjOptionDescription,
Accept.ExactlyOneArgument()

View file

@ -11,35 +11,35 @@ namespace Microsoft.DotNet.Cli
Create.Command(
"test",
LocalizableStrings.AppFullName,
Accept.ZeroOrMoreArguments,
Accept.ZeroOrMoreArguments(),
CommonOptions.HelpOption(),
Create.Option(
"-s|--settings",
LocalizableStrings.CmdSettingsDescription,
Accept.ExactlyOneArgument()
Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.CmdSettingsFile)
.ForwardAs(o => $"/p:VSTestSetting={o.Arguments.Single()}")),
Create.Option(
"-t|--list-tests",
LocalizableStrings.CmdListTestsDescription,
Accept.NoArguments
Accept.NoArguments()
.ForwardAs(o => "/p:VSTestListTests=true")),
Create.Option(
"--filter",
LocalizableStrings.CmdTestCaseFilterDescription,
Accept.ExactlyOneArgument()
Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.CmdTestCaseFilterExpression)
.ForwardAs(o => $"/p:VSTestTestCaseFilter={o.Arguments.Single()}")),
Create.Option(
"-a|--test-adapter-path",
LocalizableStrings.CmdTestAdapterPathDescription,
Accept.ExactlyOneArgument()
Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.CmdTestAdapterPath)
.ForwardAs(o => $"/p:VSTestTestAdapterPath={o.Arguments.Single()}")),
Create.Option(
"-l|--logger",
LocalizableStrings.CmdLoggerDescription,
Accept.ExactlyOneArgument()
Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.CmdLoggerOption)
.ForwardAs(o =>
{
@ -52,19 +52,19 @@ namespace Microsoft.DotNet.Cli
Create.Option(
"-o|--output",
LocalizableStrings.CmdOutputDescription,
Accept.ExactlyOneArgument()
Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.CmdOutputDir)
.ForwardAs(o => $"/p:OutputPath={o.Arguments.Single()}")),
Create.Option(
"-d|--diag",
LocalizableStrings.CmdPathTologFileDescription,
Accept.ExactlyOneArgument()
Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.CmdPathToLogFile)
.ForwardAs(o => $"/p:VSTestDiag={o.Arguments.Single()}")),
Create.Option(
"--no-build",
LocalizableStrings.CmdNoBuildDescription,
Accept.NoArguments
Accept.NoArguments()
.ForwardAs(o => "/p:VSTestNoBuild=true")),
CommonOptions.VerbosityOption());