1 instantiation of InitializationException
MSBuild (1)
InitializationException.cs (1)
187throw new InitializationException(message, invalidSwitch);
46 references to InitializationException
Microsoft.Build.CommandLine.UnitTests (18)
CommandLineSwitches_Tests.cs (1)
1150Assert.Throws<InitializationException>(() =>
XMake_Tests.cs (17)
1641Should.Throw<InitializationException>(() => 1656Should.Throw<InitializationException>(() => 1670Should.Throw<InitializationException>(() => 1684Should.Throw<InitializationException>(() => 1698Should.Throw<InitializationException>(() => 1794Should.Throw<InitializationException>(() => 1808Should.Throw<InitializationException>(() => 1825Should.Throw<InitializationException>(() => 1837Should.Throw<InitializationException>(() => 1851Should.Throw<InitializationException>(() => 1865Should.Throw<InitializationException>(() => 1882Should.Throw<InitializationException>(() => 1894Should.Throw<InitializationException>(() => 1906Should.Throw<InitializationException>(() => 1920Should.Throw<InitializationException>(() => 2012InitializationException exception = Should.Throw<InitializationException>(() =>
MSBuild (28)
CommandLineSwitches.cs (1)
883InitializationException.Throw(_errorMessage, _badCommandLineArg, _innerException, false);
InitializationException.cs (2)
157InitializationException.Throw(errorMessage, invalidSwitch); 173InitializationException.Throw(errorMessage, invalidSwitch);
XMake.cs (25)
963catch (InitializationException e) 1306InitializationException.Throw(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ProjectUpgradeNeededToVcxProj", projectFile), null); 1888InitializationException.Throw("UnsupportedOS", null, null, false); 3040InitializationException.VerifyThrow(FileSystems.Default.FileExists(projectFile), "ProjectNotFoundError", projectFile); 3532InitializationException.VerifyThrow(FileSystems.Default.FileExists(projectFile), "ProjectNotFoundError", projectFile); 3584InitializationException.VerifyThrow(string.Equals(solutionName, projectName, StringComparison.OrdinalIgnoreCase), projectDirectory == null ? "AmbiguousProjectError" : "AmbiguousProjectDirectoryError", null, projectDirectory); 3590InitializationException.VerifyThrow(false, projectDirectory == null ? "AmbiguousProjectError" : "AmbiguousProjectDirectoryError", null, projectDirectory, false); 3623InitializationException.VerifyThrow(!isAmbiguousProject, projectDirectory == null ? "AmbiguousProjectError" : "AmbiguousProjectDirectoryError", null, projectDirectory); 3630InitializationException.Throw("MissingProjectError", null, null, false); 3637InitializationException.VerifyThrow(actualSolutionFiles.Count == 1 || actualProjectFiles.Count == 1 || solutionFilterFiles.Count == 1, projectDirectory == null ? "AmbiguousProjectError" : "AmbiguousProjectDirectoryError", null, projectDirectory); 3651InitializationException.VerifyThrow(extension?.Length >= 2, "InvalidExtensionToIgnore", extension); 3654InitializationException.VerifyThrow(extension.IndexOfAny(Path.GetInvalidPathChars()) == -1, "InvalidExtensionToIgnore", extension, null, false); 3657InitializationException.VerifyThrow(string.Equals(extension, Path.GetExtension(extension), StringComparison.OrdinalIgnoreCase), "InvalidExtensionToIgnore", extension, null, false); 3660InitializationException.VerifyThrow(extension.IndexOfAny(s_wildcards) == -1, "InvalidExtensionToIgnore", extension, null, false); 4388InitializationException.VerifyThrow(logger != null, "LoggerNotFoundError", unquotedParameter); 4392InitializationException.Throw("LoggerCreationError", unquotedParameter, e, false); 4396InitializationException.Throw("LoggerCreationError", unquotedParameter, e, false); 4400InitializationException.Throw("LoggerCreationError", unquotedParameter, e, false); 4404InitializationException.Throw("LoggerCreationError", unquotedParameter, e, false); 4408InitializationException.Throw("LoggerCreationError", unquotedParameter, e, false); 4412InitializationException.Throw("LoggerFatalError", unquotedParameter, e.InnerException, true); 4439InitializationException.Throw("LoggerFatalError", unquotedParameter, e, true); 4516InitializationException.VerifyThrow(schemaFile == null, "MultipleSchemasError", parameter); 4518InitializationException.VerifyThrow(FileSystems.Default.FileExists(fileName), "SchemaNotFoundError", fileName); 4550InitializationException.Throw(message, toolsVersion);