1 instantiation of CommandLineSwitchException
MSBuild (1)
CommandLine\CommandLineSwitchException.cs (1)
154throw new CommandLineSwitchException(errorMessage, commandLineArg);
40 references to CommandLineSwitchException
Microsoft.Build.CommandLine.UnitTests (15)
CommandLineParserTests.cs (1)
32Should.Throw<CommandLineSwitchException>(() =>
CommandLineSwitches_Tests.cs (5)
1491Should.Throw<CommandLineSwitchException>(() => MSBuildApp.ProcessBooleanSwitch(new[] { "invalid" }, defaultValue: true, resourceName: "InvalidRestoreValue")); 1528Should.Throw<CommandLineSwitchException>(() => MSBuildApp.ProcessBooleanSwitch(new[] { "invalid" }, defaultValue: true, resourceName: "InvalidNoLogoValue")); 1563CommandLineSwitchException exception = null; 1570catch (CommandLineSwitchException e) 1683catch (CommandLineSwitchException e)
XMake_Tests.cs (9)
658Should.Throw<CommandLineSwitchException>(() => 681Should.Throw<CommandLineSwitchException>(() => 690Should.Throw<CommandLineSwitchException>(() => 699Should.Throw<CommandLineSwitchException>(() => 731Should.Throw<CommandLineSwitchException>(() => 740Should.Throw<CommandLineSwitchException>(() => 749Should.Throw<CommandLineSwitchException>(() => 758Should.Throw<CommandLineSwitchException>(() => 767Should.Throw<CommandLineSwitchException>(() =>
MSBuild (25)
CommandLine\CommandLineSwitches.cs (1)
899CommandLineSwitchException.Throw("SwitchErrorWithArguments", _badCommandLineArg, ResourceUtilities.GetResourceString(_errorMessage), _commandLine, StringBuilderCache.GetStringAndRelease(sb));
XMake.cs (24)
815CommandLineSwitchException.Throw("SolutionBuildInvalidForCommandLineEvaluation", 938catch (CommandLineSwitchException e) 2584CommandLineSwitchException.Throw("InvalidTerminalLoggerValue", terminalLoggerArg); 2675CommandLineSwitchException.Throw("InvalidIsolateProjectsValue", parameter); 2706CommandLineSwitchException.Throw("InvalidGraphBuildValue", parameter); 2781CommandLineSwitchException.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message); 2785CommandLineSwitchException.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message); 2808CommandLineSwitchException.Throw("InvalidPreprocessPath", parameters[parameters.Length - 1], ex.Message); 2827CommandLineSwitchException.Throw("TargetsCouldNotBePrinted", parameters[parameters.Length - 1], ex.Message); 2890CommandLineSwitchException.Throw(resourceName, parameters[parameters.Length - 1], ex.Message); 2894CommandLineSwitchException.Throw(resourceName, parameters[parameters.Length - 1], ex.Message); 2933CommandLineSwitchException.Throw("InvalidProfilerValue", parameters[parameters.Length - 1], 2938CommandLineSwitchException.Throw("InvalidProfilerValue", parameters[parameters.Length - 1], 2943CommandLineSwitchException.Throw("InvalidProfilerValue", parameters[parameters.Length - 1], 2962CommandLineSwitchException.Throw("InvalidNodeNumberValue", value); 3052CommandLineSwitchException.Throw("InvalidNodeNumberValue", nodeMode.ToString()); 3087CommandLineSwitchException.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message); 3091CommandLineSwitchException.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message); 3094CommandLineSwitchException.VerifyThrow(cpuCount > 0 && cpuCount <= 1024, "InvalidMaxCPUCountValueOutsideRange", parameters[parameters.Length - 1]); 3275CommandLineSwitchException.Throw("NameInvalid", nameof(XMakeElements.target), parameter, parameter[indexOfSpecialCharacter].ToString()); 3323CommandLineSwitchException.VerifyThrow((parameterSections[0].Length > 0) && (parameterSections.Length == 2), 3829CommandLineSwitchException.Throw("InvalidVerbosityError", value); 3917CommandLineSwitchException.VerifyThrow(loggerSpec[0].Length > 0, 3954CommandLineSwitchException.VerifyThrow(loggerAssemblySpec.Length > 0,