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) 1633catch (CommandLineSwitchException e)
XMake_Tests.cs (5)
697Should.Throw<CommandLineSwitchException>(() => 720Should.Throw<CommandLineSwitchException>(() => 729Should.Throw<CommandLineSwitchException>(() => 738Should.Throw<CommandLineSwitchException>(() => 747Should.Throw<CommandLineSwitchException>(() =>
MSBuild (27)
CommandLineSwitches.cs (1)
893CommandLineSwitchException.Throw("SwitchErrorWithArguments", _badCommandLineArg, ResourceUtilities.GetResourceString(_errorMessage), _commandLine, StringBuilderCache.GetStringAndRelease(sb));
XMake.cs (26)
810CommandLineSwitchException.Throw("SolutionBuildInvalidForCommandLineEvaluation", 933catch (CommandLineSwitchException e) 3042CommandLineSwitchException.Throw("InvalidTerminalLoggerValue", terminalLoggerArg); 3185CommandLineSwitchException.Throw("InvalidIsolateProjectsValue", parameter); 3216CommandLineSwitchException.Throw("InvalidGraphBuildValue", parameter); 3265CommandLineSwitchException.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message); 3269CommandLineSwitchException.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message); 3297CommandLineSwitchException.Throw("InvalidPreprocessPath", parameters[parameters.Length - 1], ex.Message); 3316CommandLineSwitchException.Throw("TargetsCouldNotBePrinted", parameters[parameters.Length - 1], ex.Message); 3379CommandLineSwitchException.Throw(resourceName, parameters[parameters.Length - 1], ex.Message); 3383CommandLineSwitchException.Throw(resourceName, parameters[parameters.Length - 1], ex.Message); 3422CommandLineSwitchException.Throw("InvalidProfilerValue", parameters[parameters.Length - 1], 3427CommandLineSwitchException.Throw("InvalidProfilerValue", parameters[parameters.Length - 1], 3432CommandLineSwitchException.Throw("InvalidProfilerValue", parameters[parameters.Length - 1], 3459CommandLineSwitchException.Throw("InvalidNodeNumberValue", input[0], ex.Message); 3463CommandLineSwitchException.Throw("InvalidNodeNumberValue", input[0], ex.Message); 3466CommandLineSwitchException.VerifyThrow(nodeModeNumber >= 0, "InvalidNodeNumberValueIsNegative", input[0]); 3539CommandLineSwitchException.Throw("InvalidNodeNumberValue", nodeModeNumber.ToString()); 3573CommandLineSwitchException.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message); 3577CommandLineSwitchException.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message); 3580CommandLineSwitchException.VerifyThrow(cpuCount > 0 && cpuCount <= 1024, "InvalidMaxCPUCountValueOutsideRange", parameters[parameters.Length - 1]); 3801CommandLineSwitchException.Throw("NameInvalid", nameof(XMakeElements.target), parameter, parameter[indexOfSpecialCharacter].ToString()); 3849CommandLineSwitchException.VerifyThrow((parameterSections[0].Length > 0) && (parameterSections.Length == 2), 4331CommandLineSwitchException.Throw("InvalidVerbosityError", value); 4419CommandLineSwitchException.VerifyThrow(loggerSpec[0].Length > 0, 4456CommandLineSwitchException.VerifyThrow(loggerAssemblySpec.Length > 0,