1 instantiation of CommandLineSwitchException
MSBuild (1)
CommandLineSwitchException.cs (1)
154throw new CommandLineSwitchException(errorMessage, commandLineArg);
36 references to CommandLineSwitchException
Microsoft.Build.CommandLine.UnitTests (9)
CommandLineSwitches_Tests.cs (4)
1450Should.Throw<CommandLineSwitchException>(() => MSBuildApp.ProcessBooleanSwitch(new[] { "invalid" }, defaultValue: true, resourceName: "InvalidRestoreValue")); 1485CommandLineSwitchException exception = null; 1492catch (CommandLineSwitchException e) 1609catch (CommandLineSwitchException e)
XMake_Tests.cs (5)
651Should.Throw<CommandLineSwitchException>(() => 674Should.Throw<CommandLineSwitchException>(() => 683Should.Throw<CommandLineSwitchException>(() => 692Should.Throw<CommandLineSwitchException>(() => 701Should.Throw<CommandLineSwitchException>(() =>
MSBuild (27)
CommandLineSwitches.cs (1)
892CommandLineSwitchException.Throw("SwitchErrorWithArguments", _badCommandLineArg, ResourceUtilities.GetResourceString(_errorMessage), _commandLine, StringBuilderCache.GetStringAndRelease(sb));
XMake.cs (26)
830CommandLineSwitchException.Throw("SolutionBuildInvalidForCommandLineEvaluation", 951catch (CommandLineSwitchException e) 3016CommandLineSwitchException.Throw("InvalidTerminalLoggerValue", terminalLoggerArg); 3127CommandLineSwitchException.Throw("InvalidIsolateProjectsValue", parameter); 3158CommandLineSwitchException.Throw("InvalidGraphBuildValue", parameter); 3207CommandLineSwitchException.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message); 3211CommandLineSwitchException.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message); 3239CommandLineSwitchException.Throw("InvalidPreprocessPath", parameters[parameters.Length - 1], ex.Message); 3258CommandLineSwitchException.Throw("TargetsCouldNotBePrinted", parameters[parameters.Length - 1], ex.Message); 3321CommandLineSwitchException.Throw(resourceName, parameters[parameters.Length - 1], ex.Message); 3325CommandLineSwitchException.Throw(resourceName, parameters[parameters.Length - 1], ex.Message); 3364CommandLineSwitchException.Throw("InvalidProfilerValue", parameters[parameters.Length - 1], 3369CommandLineSwitchException.Throw("InvalidProfilerValue", parameters[parameters.Length - 1], 3374CommandLineSwitchException.Throw("InvalidProfilerValue", parameters[parameters.Length - 1], 3401CommandLineSwitchException.Throw("InvalidNodeNumberValue", input[0], ex.Message); 3405CommandLineSwitchException.Throw("InvalidNodeNumberValue", input[0], ex.Message); 3408CommandLineSwitchException.VerifyThrow(nodeModeNumber >= 0, "InvalidNodeNumberValueIsNegative", input[0]); 3467CommandLineSwitchException.Throw("InvalidNodeNumberValue", nodeModeNumber.ToString()); 3501CommandLineSwitchException.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message); 3505CommandLineSwitchException.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message); 3508CommandLineSwitchException.VerifyThrow(cpuCount > 0 && cpuCount <= 1024, "InvalidMaxCPUCountValueOutsideRange", parameters[parameters.Length - 1]); 3729CommandLineSwitchException.Throw("NameInvalid", nameof(XMakeElements.target), parameter, parameter[indexOfSpecialCharacter].ToString()); 3782CommandLineSwitchException.VerifyThrow((parameterSections[0].Length > 0) && (parameterSections.Length == 2), 4248CommandLineSwitchException.Throw("InvalidVerbosityError", value); 4336CommandLineSwitchException.VerifyThrow(loggerSpec[0].Length > 0, 4373CommandLineSwitchException.VerifyThrow(loggerAssemblySpec.Length > 0,