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)
1448Should.Throw<CommandLineSwitchException>(() => MSBuildApp.ProcessBooleanSwitch(new[] { "invalid" }, defaultValue: true, resourceName: "InvalidRestoreValue")); 1483CommandLineSwitchException exception = null; 1490catch (CommandLineSwitchException e) 1607catch (CommandLineSwitchException e)
XMake_Tests.cs (5)
652Should.Throw<CommandLineSwitchException>(() => 675Should.Throw<CommandLineSwitchException>(() => 684Should.Throw<CommandLineSwitchException>(() => 693Should.Throw<CommandLineSwitchException>(() => 702Should.Throw<CommandLineSwitchException>(() =>
MSBuild (27)
CommandLineSwitches.cs (1)
891CommandLineSwitchException.Throw("SwitchErrorWithArguments", _badCommandLineArg, ResourceUtilities.GetResourceString(_errorMessage), _commandLine, StringBuilderCache.GetStringAndRelease(sb));
XMake.cs (26)
834CommandLineSwitchException.Throw("SolutionBuildInvalidForCommandLineEvaluation", 955catch (CommandLineSwitchException e) 3032CommandLineSwitchException.Throw("InvalidTerminalLoggerValue", terminalLoggerArg); 3143CommandLineSwitchException.Throw("InvalidIsolateProjectsValue", parameter); 3174CommandLineSwitchException.Throw("InvalidGraphBuildValue", parameter); 3223CommandLineSwitchException.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message); 3227CommandLineSwitchException.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message); 3255CommandLineSwitchException.Throw("InvalidPreprocessPath", parameters[parameters.Length - 1], ex.Message); 3274CommandLineSwitchException.Throw("TargetsCouldNotBePrinted", parameters[parameters.Length - 1], ex.Message); 3337CommandLineSwitchException.Throw(resourceName, parameters[parameters.Length - 1], ex.Message); 3341CommandLineSwitchException.Throw(resourceName, parameters[parameters.Length - 1], ex.Message); 3380CommandLineSwitchException.Throw("InvalidProfilerValue", parameters[parameters.Length - 1], 3385CommandLineSwitchException.Throw("InvalidProfilerValue", parameters[parameters.Length - 1], 3390CommandLineSwitchException.Throw("InvalidProfilerValue", parameters[parameters.Length - 1], 3417CommandLineSwitchException.Throw("InvalidNodeNumberValue", input[0], ex.Message); 3421CommandLineSwitchException.Throw("InvalidNodeNumberValue", input[0], ex.Message); 3424CommandLineSwitchException.VerifyThrow(nodeModeNumber >= 0, "InvalidNodeNumberValueIsNegative", input[0]); 3498CommandLineSwitchException.Throw("InvalidNodeNumberValue", nodeModeNumber.ToString()); 3532CommandLineSwitchException.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message); 3536CommandLineSwitchException.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message); 3539CommandLineSwitchException.VerifyThrow(cpuCount > 0 && cpuCount <= 1024, "InvalidMaxCPUCountValueOutsideRange", parameters[parameters.Length - 1]); 3760CommandLineSwitchException.Throw("NameInvalid", nameof(XMakeElements.target), parameter, parameter[indexOfSpecialCharacter].ToString()); 3808CommandLineSwitchException.VerifyThrow((parameterSections[0].Length > 0) && (parameterSections.Length == 2), 4274CommandLineSwitchException.Throw("InvalidVerbosityError", value); 4362CommandLineSwitchException.VerifyThrow(loggerSpec[0].Length > 0, 4399CommandLineSwitchException.VerifyThrow(loggerAssemblySpec.Length > 0,