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