12 instantiations of InvalidProjectFileException
Microsoft.Build (8)
BackEnd\BuildManager\BuildManager.cs (1)
1701LogInvalidProjectFileError(new InvalidProjectFileException(ex.Message, ex));
BackEnd\Components\Communications\SerializationContractInitializer.cs (1)
31new(typeof(InvalidProjectFileException), (msg, inner) => new InvalidProjectFileException(msg, inner)),
BackEnd\Components\RequestBuilder\TaskBuilder.cs (2)
767taskException = new InvalidProjectFileException( 894throw new InvalidProjectFileException(ipex.Message, ipex);
Graph\GraphBuilder.cs (1)
278throw new InvalidProjectFileException(
Graph\ProjectInterpretation.cs (1)
439throw new InvalidProjectFileException(
ProjectErrorUtilities.cs (1)
268throw new InvalidProjectFileException(elementLocation.File, elementLocation.Line, elementLocation.Column, 0 /* Unknown end line */, 0 /* Unknown end column */, message, errorSubCategory, errorCode, helpKeyword);
ProjectFileErrorUtilities.cs (1)
153throw new InvalidProjectFileException(projectFile.File, projectFile.Line, projectFile.Column, projectFile.EndLine, projectFile.EndColumn, message, errorSubCategory, errorCode, helpKeyword, innerException);
Microsoft.Build.Engine.UnitTests (4)
BackEnd\BinaryTranslator_Tests.cs (2)
224throw new InvalidProjectFileException("sample message"); 292throw new InvalidProjectFileException("sample message", new InternalErrorException("Another message"));
BackEnd\LoggingServicesLogMethod_Tests.cs (2)
156service.LogInvalidProjectFileError(null, new InvalidProjectFileException()); 182InvalidProjectFileException exception = new InvalidProjectFileException("ProjectFile", 1, 2, 3, 4, "Message", "errorSubCategory", "ErrorCode", "HelpKeyword");
413 references to InvalidProjectFileException
Microsoft.Build (55)
BackEnd\BuildManager\BuildManager.cs (6)
1686if (innerException is InvalidProjectFileException innerProjectException) 1694if (ex is InvalidProjectFileException projectException) 1731void LogInvalidProjectFileError(InvalidProjectFileException projectException) 1840if (ex is InvalidProjectFileException projectException) 1858if (ex is not InvalidProjectFileException) 2338catch (InvalidProjectFileException e)
BackEnd\Components\Communications\SerializationContractInitializer.cs (1)
31new(typeof(InvalidProjectFileException), (msg, inner) => new InvalidProjectFileException(msg, inner)),
BackEnd\Components\Logging\ILoggingService.cs (2)
11using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 409void LogInvalidProjectFileError(BuildEventContext buildEventContext, InvalidProjectFileException invalidProjectFileException);
BackEnd\Components\Logging\LoggingContext.cs (1)
230internal void LogInvalidProjectFileError(InvalidProjectFileException invalidProjectFileException)
BackEnd\Components\Logging\LoggingServiceLogMethods.cs (2)
14using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 154public void LogInvalidProjectFileError(BuildEventContext buildEventContext, InvalidProjectFileException invalidProjectFileException)
BackEnd\Components\RequestBuilder\RequestBuilder.cs (1)
786catch (InvalidProjectFileException ex)
BackEnd\Components\RequestBuilder\TargetEntry.cs (2)
19using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 566catch (InvalidProjectFileException e)
BackEnd\Components\RequestBuilder\TaskBuilder.cs (5)
400catch (InvalidProjectFileException e) 465catch (InvalidProjectFileException e) 879else if (type == typeof(InvalidProjectFileException)) 883InvalidProjectFileException ipex = (InvalidProjectFileException)taskException;
Construction\ProjectRootElement.cs (3)
24using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 1654/// If the new state has invalid XML or MSBuild syntax, then this method throws an <see cref="InvalidProjectFileException"/>. 2032catch (InvalidProjectFileException)
Definition\Project.cs (5)
31using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 381/// <exception cref="InvalidProjectFileException">If the evaluation fails.</exception> 1917catch (InvalidProjectFileException ex) 1960catch (InvalidProjectFileException ex) 3689catch (InvalidProjectFileException ex)
Definition\ProjectCollection.cs (3)
25using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 357catch (InvalidProjectFileException ex2) 1200catch (InvalidProjectFileException ex)
Definition\ToolsetReader.cs (2)
17using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 584catch (InvalidProjectFileException ex)
Errors\InvalidProjectFileException.cs (1)
73internal InvalidProjectFileException(string message, InvalidProjectFileException innerException)
Evaluation\Evaluator.cs (2)
33using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 2202catch (InvalidProjectFileException ex)
Graph\ProjectGraph.cs (15)
112/// <exception cref="InvalidProjectFileException"> 125/// <exception cref="InvalidProjectFileException"> 142/// <exception cref="InvalidProjectFileException"> 159/// <exception cref="InvalidProjectFileException"> 184/// <see cref="InvalidProjectFileException" /> 202/// <exception cref="InvalidProjectFileException"> 219/// <exception cref="InvalidProjectFileException"> 240/// <exception cref="InvalidProjectFileException"> 261/// <exception cref="InvalidProjectFileException"> 273/// <exception cref="InvalidProjectFileException"> 285/// <exception cref="InvalidProjectFileException"> 301/// <exception cref="InvalidProjectFileException"> 323/// <exception cref="InvalidProjectFileException"> 363/// <exception cref="InvalidProjectFileException"> 407/// <exception cref="InvalidProjectFileException">
Instance\TaskRegistry.cs (2)
23using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 1368/// <exception cref="InvalidProjectFileException">If the task factory could not be properly created an InvalidProjectFileException will be thrown</exception>
ProjectErrorUtilities.cs (1)
4using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException;
ProjectFileErrorUtilities.cs (1)
6using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException;
Microsoft.Build.Engine.OM.UnitTests (163)
Construction\ConstructionEditing_Tests.cs (2)
14using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 2308Assert.Throws<InvalidProjectFileException>(infiniteChooseLoop);
Construction\ProjectChooseElement_Tests.cs (10)
12using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 29Assert.Throws<InvalidProjectFileException>(() => 47Assert.Throws<InvalidProjectFileException>(() => 64Assert.Throws<InvalidProjectFileException>(() => 83Assert.Throws<InvalidProjectFileException>(() => 107Assert.Throws<InvalidProjectFileException>(() => 126Assert.Throws<InvalidProjectFileException>(() => 146Assert.Throws<InvalidProjectFileException>(() => 169Assert.Throws<InvalidProjectFileException>(() => 237Assert.Throws<InvalidProjectFileException>(() =>
Construction\ProjectExtensionsElement_Tests.cs (3)
9using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 47Assert.Throws<InvalidProjectFileException>(() => 64Assert.Throws<InvalidProjectFileException>(() =>
Construction\ProjectImportElement_Tests.cs (4)
12using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 40Assert.Throws<InvalidProjectFileException>(() => 57Assert.Throws<InvalidProjectFileException>(() => 74Assert.Throws<InvalidProjectFileException>(() =>
Construction\ProjectImportGroupElement_Tests.cs (5)
10using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 179Assert.Throws<InvalidProjectFileException>(() => 199Assert.Throws<InvalidProjectFileException>(() => 219Assert.Throws<InvalidProjectFileException>(() => 238Assert.Throws<InvalidProjectFileException>(() =>
Construction\ProjectItemDefinitionElement_Tests.cs (1)
194Assert.Throws<InvalidProjectFileException>(() =>
Construction\ProjectItemDefinitionGroupElement_Tests.cs (2)
8using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 36Assert.Throws<InvalidProjectFileException>(() =>
Construction\ProjectItemElement_Tests.cs (16)
11using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 132Assert.Throws<InvalidProjectFileException>(() => 160Assert.Throws<InvalidProjectFileException>(() => 188Assert.Throws<InvalidProjectFileException>(() => 216Assert.Throws<InvalidProjectFileException>(() => 236var exception = 237Assert.Throws<InvalidProjectFileException>( 259var exception = 260Assert.Throws<InvalidProjectFileException>( 301Assert.Throws<InvalidProjectFileException>(() => 445Assert.Throws<InvalidProjectFileException>(() => 470Assert.Throws<InvalidProjectFileException>(() => 495Assert.Throws<InvalidProjectFileException>(() => 527Assert.Throws<InvalidProjectFileException>(() => 555Assert.Throws<InvalidProjectFileException>(() => 583Assert.Throws<InvalidProjectFileException>(() =>
Construction\ProjectMetadataElement_Tests.cs (13)
12using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 49Assert.Throws<InvalidProjectFileException>(() => 70Assert.Throws<InvalidProjectFileException>(() => 103Assert.Throws<InvalidProjectFileException>(() => 115Assert.Throws<InvalidProjectFileException>(() => 148Assert.Throws<InvalidProjectFileException>(() => 160Assert.Throws<InvalidProjectFileException>(() => 196Assert.Throws<InvalidProjectFileException>(() => 261Assert.Throws<InvalidProjectFileException>(() => 274Assert.Throws<InvalidProjectFileException>(() => 309Assert.Throws<InvalidProjectFileException>(() => 336Assert.Throws<InvalidProjectFileException>(() => 373Assert.Throws<InvalidProjectFileException>(() =>
Construction\ProjectOnErrorElement_Tests.cs (8)
9using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 70Assert.Throws<InvalidProjectFileException>(() => 96Assert.Throws<InvalidProjectFileException>(() => 119Assert.Throws<InvalidProjectFileException>(() => 138Assert.Throws<InvalidProjectFileException>(() => 159Assert.Throws<InvalidProjectFileException>(() => 179Assert.Throws<InvalidProjectFileException>(() => 199Assert.Throws<InvalidProjectFileException>(() =>
Construction\ProjectOutputElement_Tests.cs (8)
9using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 56Assert.Throws<InvalidProjectFileException>(() => 78Assert.Throws<InvalidProjectFileException>(() => 100Assert.Throws<InvalidProjectFileException>(() => 122Assert.Throws<InvalidProjectFileException>(() => 144Assert.Throws<InvalidProjectFileException>(() => 168Assert.Throws<InvalidProjectFileException>(() => 190Assert.Throws<InvalidProjectFileException>(() =>
Construction\ProjectPropertyElement_Tests.cs (6)
9using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 62Assert.Throws<InvalidProjectFileException>(() => 81Assert.Throws<InvalidProjectFileException>(() => 100Assert.Throws<InvalidProjectFileException>(() => 119Assert.Throws<InvalidProjectFileException>(() => 138Assert.Throws<InvalidProjectFileException>(() =>
Construction\ProjectRootElement_Tests.cs (16)
20using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 272Assert.Throws<InvalidProjectFileException>(() => 284Assert.Throws<InvalidProjectFileException>(() => 297Assert.Throws<InvalidProjectFileException>(() => 312Assert.Throws<InvalidProjectFileException>(() => 329Assert.Throws<InvalidProjectFileException>(() => 344Assert.Throws<InvalidProjectFileException>(() => 376catch (InvalidProjectFileException ex) 396Assert.Throws<InvalidProjectFileException>(() => 416Assert.Throws<InvalidProjectFileException>(() => 437catch (InvalidProjectFileException) 991Assert.Throws<InvalidProjectFileException>(() => 1639var exception = 1640Assert.Throws<InvalidProjectFileException>( 1806var exception = 1807Assert.Throws<InvalidProjectFileException>(
Construction\ProjectTargetElement_Tests.cs (5)
14using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 166Assert.Throws<InvalidProjectFileException>(() => 183Assert.Throws<InvalidProjectFileException>(() => 358var error = Assert.Throws<InvalidProjectFileException>(() =>
Construction\ProjectTaskElement_Tests.cs (2)
9using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 86Assert.Throws<InvalidProjectFileException>(() =>
Construction\ProjectUsingTaskElement_Tests.cs (15)
9using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 37Assert.Throws<InvalidProjectFileException>(() => 54Assert.Throws<InvalidProjectFileException>(() => 71Assert.Throws<InvalidProjectFileException>(() => 88Assert.Throws<InvalidProjectFileException>(() => 105Assert.Throws<InvalidProjectFileException>(() => 122Assert.Throws<InvalidProjectFileException>(() => 139Assert.Throws<InvalidProjectFileException>(() => 156Assert.Throws<InvalidProjectFileException>(() => 173Assert.Throws<InvalidProjectFileException>(() => 348Assert.Throws<InvalidProjectFileException>(() => 368Assert.Throws<InvalidProjectFileException>(() => 388Assert.Throws<InvalidProjectFileException>(() => 433Assert.Throws<InvalidProjectFileException>(() => 456Assert.Throws<InvalidProjectFileException>(() =>
Construction\SolutionFile_Tests.cs (2)
58Assert.Throws<InvalidProjectFileException>(() => 138Assert.Throws<InvalidProjectFileException>(() =>
Construction\UsingTaskBodyElement_Tests.cs (3)
9using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 38Assert.Throws<InvalidProjectFileException>(() => 58Assert.Throws<InvalidProjectFileException>(() =>
Construction\UsingTaskParameterElement_Tests.cs (2)
9using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 80Assert.Throws<InvalidProjectFileException>(() =>
Construction\UsingTaskParameterGroup_Tests.cs (3)
9using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 107Assert.Throws<InvalidProjectFileException>(() => 119Assert.Throws<InvalidProjectFileException>(() =>
Definition\Project_Tests.cs (17)
22using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 219catch (InvalidProjectFileException ex) 244Should.Throw<InvalidProjectFileException>(() => 257Should.Throw<InvalidProjectFileException>(() => 270Should.Throw<InvalidProjectFileException>(() => 290Should.Throw<InvalidProjectFileException>(() => 322Should.Throw<InvalidProjectFileException>(() => 336Should.Throw<InvalidProjectFileException>(() => 2139Should.Throw<InvalidProjectFileException>(() => 2153Should.Throw<InvalidProjectFileException>(() => 2167Should.Throw<InvalidProjectFileException>(() => 2432Should.Throw<InvalidProjectFileException>(() => 2456Should.Throw<InvalidProjectFileException>(() => 2526Should.Throw<InvalidProjectFileException>(() => 2648Should.Throw<InvalidProjectFileException>(() => 2693Should.Throw<InvalidProjectFileException>(() => 4274Assert.Throws<InvalidProjectFileException>(() => project.ReevaluateIfNecessary());
Definition\ProjectCollection_Tests.cs (2)
17using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 729catch (InvalidProjectFileException)
Definition\ProjectItem_Tests.cs (7)
20using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 787Should.Throw<InvalidProjectFileException>(() => { _ = project.AddItem("i", unevaluatedInclude); }); 954Should.Throw<InvalidProjectFileException>(() => { ProjectInstance.FromFile(testProjectFile, new ProjectOptions()); }); 1630Assert.Throws<InvalidProjectFileException>(() => 2704Should.Throw<InvalidProjectFileException>(() => ObjectModelHelpers.CreateInMemoryProject(content)) 2997var exception = Assert.Throws<InvalidProjectFileException>(() =>
Definition\ProjectItemDefinition_Tests.cs (9)
15using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 473Assert.Throws<InvalidProjectFileException>(() => 495Assert.Throws<InvalidProjectFileException>(() => 517Assert.Throws<InvalidProjectFileException>(() => 539Assert.Throws<InvalidProjectFileException>(() => 561Assert.Throws<InvalidProjectFileException>(() => 583Assert.Throws<InvalidProjectFileException>(() => 605Assert.Throws<InvalidProjectFileException>(() => 627Assert.Throws<InvalidProjectFileException>(() =>
Instance\ProjectItemInstance_Tests.cs (2)
19using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 735Assert.Throws<InvalidProjectFileException>(() =>
Microsoft.Build.Engine.UnitTests (190)
BackEnd\AssemblyTaskFactory_Tests.cs (6)
14using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 68Assert.Throws<InvalidProjectFileException>(() => 80Assert.Throws<InvalidProjectFileException>(() => 92Assert.Throws<InvalidProjectFileException>(() => 152Assert.Throws<InvalidProjectFileException>(() => 163Assert.Throws<InvalidProjectFileException>(() =>
BackEnd\BatchingEngine_Tests.cs (4)
16using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 102catch (InvalidProjectFileException ex) 161Assert.Throws<InvalidProjectFileException>(() => 198Assert.Throws<InvalidProjectFileException>(() =>
BackEnd\BuildManager_Tests.cs (4)
4128submission1.BuildResult.Exception.ShouldBeOfType<InvalidProjectFileException>(); 4129submission2.BuildResult.Exception.ShouldBeOfType<InvalidProjectFileException>(); 4258aggException.InnerExceptions[0].ShouldBeOfType<InvalidProjectFileException>().ProjectFile.ShouldBeOneOf(project2, project3); 4259aggException.InnerExceptions[1].ShouldBeOfType<InvalidProjectFileException>().ProjectFile.ShouldBeOneOf(project2, project3);
BackEnd\IntrinsicTask_Tests.cs (12)
19using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 87Assert.Throws<InvalidProjectFileException>(() => 105Assert.Throws<InvalidProjectFileException>(() => 143Assert.Throws<InvalidProjectFileException>(() => 160Assert.Throws<InvalidProjectFileException>(() => 664Assert.Throws<InvalidProjectFileException>(() => 758Assert.Throws<InvalidProjectFileException>(() => 774Assert.Throws<InvalidProjectFileException>(() => 792Assert.Throws<InvalidProjectFileException>(() => 1604Assert.Throws<InvalidProjectFileException>(() => 2114Assert.ThrowsAny<InvalidProjectFileException>(() => ExecuteTask(task, lookup)) 3006Assert.Throws<InvalidProjectFileException>(() =>
BackEnd\LoggingServicesLogMethod_Tests.cs (2)
20using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 182InvalidProjectFileException exception = new InvalidProjectFileException("ProjectFile", 1, 2, 3, 4, "Message", "errorSubCategory", "ErrorCode", "HelpKeyword");
BackEnd\MockLoggingService.cs (2)
15using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 409public void LogInvalidProjectFileError(BuildEventContext buildEventContext, InvalidProjectFileException invalidProjectFileException)
BackEnd\OnError_Tests.cs (2)
14using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 556Assert.Throws<InvalidProjectFileException>(() =>
BackEnd\RequestBuilder_Tests.cs (2)
23using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 236Assert.Equal(typeof(InvalidProjectFileException), _buildRequestCompleted_Entry.Result.Exception.GetType());
BackEnd\SdkResolverLoader_Tests.cs (12)
137InvalidProjectFileException exception = Should.Throw<InvalidProjectFileException>(() => 169InvalidProjectFileException exception = Should.Throw<InvalidProjectFileException>(() => 200InvalidProjectFileException exception = Should.Throw<InvalidProjectFileException>(() => 286var ex = Should.Throw<InvalidProjectFileException>(() => loader.FindPotentialSdkResolvers(root, new MockElementLocation("file"))); 302var ex = Should.Throw<InvalidProjectFileException>(() => loader.FindPotentialSdkResolvers(root, new MockElementLocation("file"))); 326var ex = Should.Throw<InvalidProjectFileException>(() => loader.FindPotentialSdkResolvers(root, new MockElementLocation("file")));
BackEnd\TaskExecutionHost_Tests.cs (7)
24using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 157Assert.Throws<InvalidProjectFileException>(() => 490Assert.Throws<InvalidProjectFileException>(() => 930Assert.Throws<InvalidProjectFileException>(() => 941Assert.Throws<InvalidProjectFileException>(() => 952Assert.Throws<InvalidProjectFileException>(() => 979Assert.Throws<InvalidProjectFileException>(() =>
BackEnd\TaskRegistry_Tests.cs (11)
24using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 1247InvalidProjectFileException exception = Should.Throw<InvalidProjectFileException>(() => registry.GetRegisteredTask("Task1", "none", null, false, new TargetLoggingContext(_loggingService, new BuildEventContext(1, 1, BuildEventContext.InvalidProjectContextId, 1)), ElementLocation.Create("none", 1, 2))); 1375Assert.Throws<InvalidProjectFileException>(() => 1417Assert.Throws<InvalidProjectFileException>(() => 1459Assert.Throws<InvalidProjectFileException>(() => 1481Assert.Throws<InvalidProjectFileException>(() => 1552Assert.Throws<InvalidProjectFileException>(() => 1600Assert.Throws<InvalidProjectFileException>(() => 1647Assert.Throws<InvalidProjectFileException>(() => 1807Assert.Throws<InvalidProjectFileException>(() =>
Construction\ElementLocation_Tests.cs (2)
111catch (InvalidProjectFileException ex) 146catch (InvalidProjectFileException ex)
Construction\SolutionFile_OldParser_Tests.cs (16)
57Should.Throw<InvalidProjectFileException>(() => 818Should.Throw<InvalidProjectFileException>(() => 835Should.Throw<InvalidProjectFileException>(() => 1212InvalidProjectFileException e = Should.Throw<InvalidProjectFileException>(() => 1258InvalidProjectFileException e = Should.Throw<InvalidProjectFileException>(() => ParseSolutionHelper(solutionFileContents)); 1779Should.Throw<InvalidProjectFileException>(() => 1805Should.Throw<InvalidProjectFileException>(() => 1831Should.Throw<InvalidProjectFileException>(() => 2299var exception = Should.Throw<InvalidProjectFileException>(parseSolution); 2343var exception = Should.Throw<InvalidProjectFileException>(parseSolution); 2389var exception = Should.Throw<InvalidProjectFileException>(parseSolution);
Construction\SolutionFilter_Tests.cs (2)
214InvalidProjectFileException e = Should.Throw<InvalidProjectFileException>(() => SolutionFile.Parse(slnf.Path));
Construction\SolutionProjectGenerator_Tests.cs (4)
20using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 744Assert.Throws<InvalidProjectFileException>(() => 1486catch (InvalidProjectFileException) 2304Assert.Throws<InvalidProjectFileException>(() =>
Definition\ItemDefinitionGroup_Tests.cs (8)
15using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 163Assert.Throws<InvalidProjectFileException>(() => 192Assert.Throws<InvalidProjectFileException>(() => 220Assert.Throws<InvalidProjectFileException>(() => 812Assert.Throws<InvalidProjectFileException>(() => 831Assert.Throws<InvalidProjectFileException>(() => 847Assert.Throws<InvalidProjectFileException>(() => 1059Assert.Throws<InvalidProjectFileException>(() =>
Definition\ToolsVersion_Tests.cs (2)
20using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 404Assert.Throws<InvalidProjectFileException>(() =>
EscapingInProjects_Tests.cs (2)
22using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 782catch (InvalidProjectFileException ex)
Evaluation\Evaluator_Tests.cs (11)
24using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 66Assert.Throws<InvalidProjectFileException>(() => collection.LoadProject(projectFile.Path)); 94catch (InvalidProjectFileException) { } 955InvalidProjectFileException ex = Assert.Throws<InvalidProjectFileException>(() => 1030Assert.Throws<InvalidProjectFileException>(() => 3123Assert.Throws<InvalidProjectFileException>(() => 4480catch (InvalidProjectFileException e) 4535InvalidProjectFileException ex = Assert.Throws<InvalidProjectFileException>(() => 4986Should.Throw<InvalidProjectFileException>(() =>
Evaluation\Expander_Tests.cs (34)
29using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 1260catch (Microsoft.Build.Exceptions.InvalidProjectFileException e) 1287catch (Microsoft.Build.Exceptions.InvalidProjectFileException e) 1758Assert.Throws<InvalidProjectFileException>(() => 1775Assert.Throws<InvalidProjectFileException>(() => 2349Assert.Throws<InvalidProjectFileException>(() => 2367Assert.Throws<InvalidProjectFileException>(() => 2384Assert.Throws<InvalidProjectFileException>(() => 2401Assert.Throws<InvalidProjectFileException>(() => 2419Assert.Throws<InvalidProjectFileException>(() => 2435Assert.Throws<InvalidProjectFileException>(() => 2451Assert.Throws<InvalidProjectFileException>(() => 2467Assert.Throws<InvalidProjectFileException>(() => 2655Assert.Throws<InvalidProjectFileException>(() => expander.ExpandIntoStringLeaveEscaped("$([Microsoft.FOO.FileIO.FileSystem]::CurrentDirectory)", ExpanderOptions.ExpandProperties, MockElementLocation.Instance)); 2656Assert.Throws<InvalidProjectFileException>(() => expander.ExpandIntoStringLeaveEscaped("$([Foo.Baz]::new())", ExpanderOptions.ExpandProperties, MockElementLocation.Instance)); 2657Assert.Throws<InvalidProjectFileException>(() => expander.ExpandIntoStringLeaveEscaped("$([Foo]::new())", ExpanderOptions.ExpandProperties, MockElementLocation.Instance)); 2658Assert.Throws<InvalidProjectFileException>(() => expander.ExpandIntoStringLeaveEscaped("$([Foo.]::new())", ExpanderOptions.ExpandProperties, MockElementLocation.Instance)); 2659Assert.Throws<InvalidProjectFileException>(() => expander.ExpandIntoStringLeaveEscaped("$([.Foo]::new())", ExpanderOptions.ExpandProperties, MockElementLocation.Instance)); 2660Assert.Throws<InvalidProjectFileException>(() => expander.ExpandIntoStringLeaveEscaped("$([.]::new())", ExpanderOptions.ExpandProperties, MockElementLocation.Instance)); 2661Assert.Throws<InvalidProjectFileException>(() => expander.ExpandIntoStringLeaveEscaped("$([]::new())", ExpanderOptions.ExpandProperties, MockElementLocation.Instance)); 3345var ex = Assert.Throws<InvalidProjectFileException>( 3451InvalidProjectFileException exception = Assert.Throws<InvalidProjectFileException>(() => 3467InvalidProjectFileException exception = Assert.Throws<InvalidProjectFileException>(() => 3629Assert.Throws<InvalidProjectFileException>(() => 4330catch (InvalidProjectFileException ex) 4526Assert.Throws<InvalidProjectFileException>(() => 4602Assert.Throws<InvalidProjectFileException>(() => 5037var exception = Should.Throw<InvalidProjectFileException>(() => 5078var exception = Should.Throw<InvalidProjectFileException>(() =>
Evaluation\ImportFromMSBuildExtensionsPath_Tests.cs (5)
60Assert.Throws<InvalidProjectFileException>(() => projColln.LoadProject(mainProjectPath)); 310Assert.Throws<InvalidProjectFileException>(() => projColln.LoadProject(mainProjectPath)); 643Assert.Throws<InvalidProjectFileException>(() => projectCollection.LoadProject(mainProjectPath)); 837Assert.Throws<InvalidProjectFileException>(() => projectCollection.LoadProject(mainProjectPath)); 871Assert.Throws<InvalidProjectFileException>(() => projectCollection.LoadProject(mainProjectPath));
Evaluation\ProjectSdkImplicitImport_Tests.cs (7)
296InvalidProjectFileException exception = Assert.Throws<InvalidProjectFileException>(() => 328Assert.Throws<InvalidProjectFileException>( 395var e = 396Assert.Throws<InvalidProjectFileException>(() => new Project( 412InvalidProjectFileException exception = Assert.Throws<InvalidProjectFileException>(() =>
ExpressionTree_Tests.cs (1)
491catch (InvalidProjectFileException e)
ExpressionTreeExpression_Tests.cs (1)
505catch (InvalidProjectFileException ex)
Graph\GraphLoadedFromSolution_tests.cs (2)
56var exception = Should.Throw<InvalidProjectFileException>(
Graph\ProjectGraph_Tests.cs (3)
566aggException.InnerExceptions[0].ShouldBeOfType<InvalidProjectFileException>(); 2921InvalidProjectFileException exception = getTargetListsFunc.ShouldThrow<InvalidProjectFileException>();
InvalidProjectFileException_Tests.cs (1)
77catch (InvalidProjectFileException e)
Parser_Tests.cs (21)
144catch (InvalidProjectFileException e) 156catch (InvalidProjectFileException e) 168catch (InvalidProjectFileException e) 180catch (InvalidProjectFileException e) 192catch (InvalidProjectFileException e) 204catch (InvalidProjectFileException e) 243catch (InvalidProjectFileException e) 255catch (InvalidProjectFileException e) 267catch (InvalidProjectFileException e) 279catch (InvalidProjectFileException e) 291catch (InvalidProjectFileException e) 303catch (InvalidProjectFileException e) 327catch (InvalidProjectFileException e) 340catch (InvalidProjectFileException e) 352catch (InvalidProjectFileException e) 365catch (InvalidProjectFileException e) 378catch (InvalidProjectFileException e) 391catch (InvalidProjectFileException e) 403catch (InvalidProjectFileException e) 416catch (InvalidProjectFileException e) 428catch (InvalidProjectFileException e)
Scanner_Tests.cs (1)
60catch (InvalidProjectFileException ex)
Utilities_Tests.cs (3)
11using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException; 150Assert.Throws<InvalidProjectFileException>(() => 167Assert.Throws<InvalidProjectFileException>(() =>
Microsoft.Build.UnitTests.Shared (1)
ObjectModelHelpers.cs (1)
29using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException;
MSBuild (4)
XMake.cs (4)
854catch (InvalidProjectFileException) 1652if (exception is not InvalidProjectFileException 1653&& !(exception is AggregateException aggregateException && aggregateException.InnerExceptions.All(innerException => innerException is InvalidProjectFileException)) 1686catch (InvalidProjectFileException ex)