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