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)
1474Should.Throw<CommandLineSwitchException>(() => MSBuildApp.ProcessBooleanSwitch(new[] { "invalid" }, defaultValue: true, resourceName: "InvalidRestoreValue")); 1509CommandLineSwitchException exception = null; 1516catch (CommandLineSwitchException e) 1629catch (CommandLineSwitchException e)
XMake_Tests.cs (5)
686Should.Throw<CommandLineSwitchException>(() => 709Should.Throw<CommandLineSwitchException>(() => 718Should.Throw<CommandLineSwitchException>(() => 727Should.Throw<CommandLineSwitchException>(() => 736Should.Throw<CommandLineSwitchException>(() =>
MSBuild (27)
CommandLineSwitches.cs (1)
893CommandLineSwitchException.Throw("SwitchErrorWithArguments", _badCommandLineArg, ResourceUtilities.GetResourceString(_errorMessage), _commandLine, StringBuilderCache.GetStringAndRelease(sb));
XMake.cs (26)
748CommandLineSwitchException.Throw("SolutionBuildInvalidForCommandLineEvaluation", 871catch (CommandLineSwitchException e) 2948CommandLineSwitchException.Throw("InvalidTerminalLoggerValue", terminalLoggerArg); 3091CommandLineSwitchException.Throw("InvalidIsolateProjectsValue", parameter); 3122CommandLineSwitchException.Throw("InvalidGraphBuildValue", parameter); 3171CommandLineSwitchException.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message); 3175CommandLineSwitchException.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message); 3203CommandLineSwitchException.Throw("InvalidPreprocessPath", parameters[parameters.Length - 1], ex.Message); 3222CommandLineSwitchException.Throw("TargetsCouldNotBePrinted", parameters[parameters.Length - 1], ex.Message); 3285CommandLineSwitchException.Throw(resourceName, parameters[parameters.Length - 1], ex.Message); 3289CommandLineSwitchException.Throw(resourceName, parameters[parameters.Length - 1], ex.Message); 3328CommandLineSwitchException.Throw("InvalidProfilerValue", parameters[parameters.Length - 1], 3333CommandLineSwitchException.Throw("InvalidProfilerValue", parameters[parameters.Length - 1], 3338CommandLineSwitchException.Throw("InvalidProfilerValue", parameters[parameters.Length - 1], 3365CommandLineSwitchException.Throw("InvalidNodeNumberValue", input[0], ex.Message); 3369CommandLineSwitchException.Throw("InvalidNodeNumberValue", input[0], ex.Message); 3372CommandLineSwitchException.VerifyThrow(nodeModeNumber >= 0, "InvalidNodeNumberValueIsNegative", input[0]); 3445CommandLineSwitchException.Throw("InvalidNodeNumberValue", nodeModeNumber.ToString()); 3479CommandLineSwitchException.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message); 3483CommandLineSwitchException.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message); 3486CommandLineSwitchException.VerifyThrow(cpuCount > 0 && cpuCount <= 1024, "InvalidMaxCPUCountValueOutsideRange", parameters[parameters.Length - 1]); 3707CommandLineSwitchException.Throw("NameInvalid", nameof(XMakeElements.target), parameter, parameter[indexOfSpecialCharacter].ToString()); 3755CommandLineSwitchException.VerifyThrow((parameterSections[0].Length > 0) && (parameterSections.Length == 2), 4237CommandLineSwitchException.Throw("InvalidVerbosityError", value); 4325CommandLineSwitchException.VerifyThrow(loggerSpec[0].Length > 0, 4362CommandLineSwitchException.VerifyThrow(loggerAssemblySpec.Length > 0,