Exemplo n.º 1
0
        public static Command GetCommand()
        {
            var command = new Command("build", LocalizableStrings.AppFullName);

            command.AddArgument(SlnOrProjectArgument);
            RestoreCommandParser.AddImplicitRestoreOptions(command, includeRuntimeOption: false, includeNoDependenciesOption: false);
            command.AddOption(CommonOptions.FrameworkOption(LocalizableStrings.FrameworkOptionDescription));
            command.AddOption(CommonOptions.ConfigurationOption(LocalizableStrings.ConfigurationOptionDescription));
            command.AddOption(RuntimeOption);
            command.AddOption(CommonOptions.VersionSuffixOption());
            command.AddOption(NoRestoreOption);
            command.AddOption(CommonOptions.InteractiveMsBuildForwardOption());
            command.AddOption(CommonOptions.VerbosityOption());
            command.AddOption(CommonOptions.DebugOption());
            command.AddOption(OutputOption);
            command.AddOption(NoIncrementalOption);
            command.AddOption(NoDependenciesOption);
            command.AddOption(NoLogoOption);
            command.AddOption(SelfContainedOption);
            command.AddOption(NoSelfContainedOption);
            command.AddOption(CommonOptions.ArchitectureOption());
            command.AddOption(CommonOptions.OperatingSystemOption());

            return(command);
        }
Exemplo n.º 2
0
 internal static string GetCommandLineRuntimeIdentifier(this ParseResult parseResult)
 {
     return(parseResult.HasOption(RunCommandParser.RuntimeOption) ?
            parseResult.ValueForOption <string>(RunCommandParser.RuntimeOption) :
            parseResult.HasOption(CommonOptions.OperatingSystemOption().Aliases.First()) || parseResult.HasOption(CommonOptions.ArchitectureOption().Aliases.First()) ?
            CommonOptions.ResolveRidShorthandOptionsToRuntimeIdentifier(
                parseResult.ValueForOption <string>(CommonOptions.OperatingSystemOption().Aliases.First()),
                parseResult.ValueForOption <string>(CommonOptions.ArchitectureOption().Aliases.First())) :
            null);
 }
Exemplo n.º 3
0
        public static Command GetCommand()
        {
            var command = new Command("run", LocalizableStrings.AppFullName);

            command.AddOption(ConfigurationOption);
            command.AddOption(FrameworkOption);
            command.AddOption(RuntimeOption);
            command.AddOption(ProjectOption);
            command.AddOption(PropertyOption);
            command.AddOption(LaunchProfileOption);
            command.AddOption(NoLaunchProfileOption);
            command.AddOption(NoBuildOption);
            command.AddOption(InteractiveOption);
            command.AddOption(NoRestoreOption);
            command.AddOption(CommonOptions.VerbosityOption());
            command.AddOption(CommonOptions.ArchitectureOption());
            command.AddOption(CommonOptions.OperatingSystemOption());
            command.TreatUnmatchedTokensAsErrors = false;

            return(command);
        }
Exemplo n.º 4
0
        public static Command GetCommand()
        {
            var command = new Command("test", LocalizableStrings.AppFullName);

            command.AddArgument(SlnOrProjectArgument);

            command.AddOption(SettingsOption);
            command.AddOption(ListTestsOption);
            command.AddOption(EnvOption);
            command.AddOption(FilterOption);
            command.AddOption(AdapterOption);
            command.AddOption(LoggerOption);
            command.AddOption(OutputOption);
            command.AddOption(DiagOption);
            command.AddOption(NoBuildOption);
            command.AddOption(ResultsOption);
            command.AddOption(CollectOption);
            command.AddOption(BlameOption);
            command.AddOption(BlameCrashOption);
            command.AddOption(BlameCrashDumpOption);
            command.AddOption(BlameCrashAlwaysOption);
            command.AddOption(BlameHangOption);
            command.AddOption(BlameHangDumpOption);
            command.AddOption(BlameHangTimeoutOption);
            command.AddOption(NoLogoOption);
            command.AddOption(CommonOptions.ConfigurationOption(LocalizableStrings.ConfigurationOptionDescription));
            command.AddOption(CommonOptions.FrameworkOption(LocalizableStrings.FrameworkOptionDescription));
            command.AddOption(CommonOptions.RuntimeOption(LocalizableStrings.RuntimeOptionDescription, withShortOption: false));
            command.AddOption(NoRestoreOption);
            command.AddOption(CommonOptions.InteractiveMsBuildForwardOption());
            command.AddOption(CommonOptions.VerbosityOption());
            command.AddOption(CommonOptions.ArchitectureOption(false));
            command.AddOption(CommonOptions.OperatingSystemOption());

            return(command);
        }
Exemplo n.º 5
0
 public static bool BothArchAndOsOptionsSpecified(this ParseResult parseResult) =>
 parseResult.HasOption(CommonOptions.ArchitectureOption().Aliases.First()) &&
 parseResult.HasOption(CommonOptions.OperatingSystemOption().Aliases.First());