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)
1490Should.Throw<CommandLineSwitchException>(() => MSBuildApp.ProcessBooleanSwitch(new[] { "invalid" }, defaultValue: true, resourceName: "InvalidRestoreValue")); 1527Should.Throw<CommandLineSwitchException>(() => MSBuildApp.ProcessBooleanSwitch(new[] { "invalid" }, defaultValue: true, resourceName: "InvalidNoLogoValue")); 1562CommandLineSwitchException exception = null; 1569catch (CommandLineSwitchException e) 1682catch (CommandLineSwitchException e)
XMake_Tests.cs (9)
660Should.Throw<CommandLineSwitchException>(() => 683Should.Throw<CommandLineSwitchException>(() => 692Should.Throw<CommandLineSwitchException>(() => 701Should.Throw<CommandLineSwitchException>(() => 733Should.Throw<CommandLineSwitchException>(() => 742Should.Throw<CommandLineSwitchException>(() => 751Should.Throw<CommandLineSwitchException>(() => 760Should.Throw<CommandLineSwitchException>(() => 769Should.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) 2572CommandLineSwitchException.Throw("InvalidTerminalLoggerValue", terminalLoggerArg); 2662CommandLineSwitchException.Throw("InvalidIsolateProjectsValue", parameter); 2693CommandLineSwitchException.Throw("InvalidGraphBuildValue", parameter); 2768CommandLineSwitchException.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message); 2772CommandLineSwitchException.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message); 2795CommandLineSwitchException.Throw("InvalidPreprocessPath", parameters[parameters.Length - 1], ex.Message); 2814CommandLineSwitchException.Throw("TargetsCouldNotBePrinted", parameters[parameters.Length - 1], ex.Message); 2877CommandLineSwitchException.Throw(resourceName, parameters[parameters.Length - 1], ex.Message); 2881CommandLineSwitchException.Throw(resourceName, parameters[parameters.Length - 1], ex.Message); 2920CommandLineSwitchException.Throw("InvalidProfilerValue", parameters[parameters.Length - 1], 2925CommandLineSwitchException.Throw("InvalidProfilerValue", parameters[parameters.Length - 1], 2930CommandLineSwitchException.Throw("InvalidProfilerValue", parameters[parameters.Length - 1], 2949CommandLineSwitchException.Throw("InvalidNodeNumberValue", value); 3039CommandLineSwitchException.Throw("InvalidNodeNumberValue", nodeMode.ToString()); 3074CommandLineSwitchException.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message); 3078CommandLineSwitchException.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message); 3081CommandLineSwitchException.VerifyThrow(cpuCount > 0 && cpuCount <= 1024, "InvalidMaxCPUCountValueOutsideRange", parameters[parameters.Length - 1]); 3262CommandLineSwitchException.Throw("NameInvalid", nameof(XMakeElements.target), parameter, parameter[indexOfSpecialCharacter].ToString()); 3310CommandLineSwitchException.VerifyThrow((parameterSections[0].Length > 0) && (parameterSections.Length == 2), 3816CommandLineSwitchException.Throw("InvalidVerbosityError", value); 3904CommandLineSwitchException.VerifyThrow(loggerSpec[0].Length > 0, 3941CommandLineSwitchException.VerifyThrow(loggerAssemblySpec.Length > 0,