15 instantiations of InvalidProjectFileException
Microsoft.Build (9)
BackEnd\BuildManager\BuildManager.cs (1)
1963
LogInvalidProjectFileError(new
InvalidProjectFileException
(ex.Message, ex));
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (1)
517
throw new
InvalidProjectFileException
(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("NETHostVersion_Failed", sdkVersion, MinimumSdkVersion));
BackEnd\Components\Communications\SerializationContractInitializer.cs (1)
31
new(typeof(InvalidProjectFileException), (msg, inner) => new
InvalidProjectFileException
(msg, inner)),
BackEnd\Components\RequestBuilder\TaskBuilder.cs (2)
794
taskException = new
InvalidProjectFileException
(
921
throw new
InvalidProjectFileException
(ipex.Message, ipex);
Graph\GraphBuilder.cs (1)
279
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.OM.UnitTests (2)
Construction\ProjectRootElement_Tests.cs (2)
927
throw new
InvalidProjectFileException
("Running unelevated so skipping this scenario.");
969
throw new
InvalidProjectFileException
("Running unelevated so skipping the scenario.");
Microsoft.Build.Engine.UnitTests (4)
BackEnd\BinaryTranslator_Tests.cs (2)
223
throw new
InvalidProjectFileException
("sample message");
291
throw new
InvalidProjectFileException
("sample message", new InternalErrorException("Another message"));
BackEnd\LoggingServicesLogMethod_Tests.cs (2)
155
service.LogInvalidProjectFileError(null, new
InvalidProjectFileException
());
181
InvalidProjectFileException exception = new
InvalidProjectFileException
("ProjectFile", 1, 2, 3, 4, "Message", "errorSubCategory", "ErrorCode", "HelpKeyword");
417 references to InvalidProjectFileException
Microsoft.Build (55)
BackEnd\BuildManager\BuildManager.cs (6)
1948
if (innerException is
InvalidProjectFileException
innerProjectException)
1956
if (ex is
InvalidProjectFileException
projectException)
1993
void LogInvalidProjectFileError(
InvalidProjectFileException
projectException)
2102
if (ex is
InvalidProjectFileException
projectException)
2120
if (ex is not
InvalidProjectFileException
)
2609
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
;
434
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)
789
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)
426
catch (
InvalidProjectFileException
e)
496
catch (
InvalidProjectFileException
e)
906
else if (type == typeof(
InvalidProjectFileException
))
910
InvalidProjectFileException
ipex = (
InvalidProjectFileException
)taskException;
Construction\ProjectRootElement.cs (3)
24
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
1684
/// If the new state has invalid XML or MSBuild syntax, then this method throws an <see cref="
InvalidProjectFileException
"/>.
2067
catch (
InvalidProjectFileException
)
Definition\Project.cs (5)
32
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
387
/// <exception cref="
InvalidProjectFileException
">If the evaluation fails.</exception>
1923
catch (
InvalidProjectFileException
ex)
1966
catch (
InvalidProjectFileException
ex)
3709
catch (
InvalidProjectFileException
ex)
Definition\ProjectCollection.cs (3)
26
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
385
catch (
InvalidProjectFileException
ex2)
1262
catch (
InvalidProjectFileException
ex)
Definition\ToolsetReader.cs (2)
17
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
578
catch (
InvalidProjectFileException
ex)
Errors\InvalidProjectFileException.cs (1)
74
internal InvalidProjectFileException(string message,
InvalidProjectFileException
innerException)
Evaluation\Evaluator.cs (2)
32
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
2253
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)
21
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
1407
/// <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 (165)
Construction\ConstructionEditing_Tests.cs (2)
13
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
2307
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)
13
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
41
Assert.Throws<
InvalidProjectFileException
>(() =>
58
Assert.Throws<
InvalidProjectFileException
>(() =>
75
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 (18)
19
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
269
Assert.Throws<
InvalidProjectFileException
>(() =>
281
Assert.Throws<
InvalidProjectFileException
>(() =>
294
Assert.Throws<
InvalidProjectFileException
>(() =>
309
Assert.Throws<
InvalidProjectFileException
>(() =>
326
Assert.Throws<
InvalidProjectFileException
>(() =>
341
Assert.Throws<
InvalidProjectFileException
>(() =>
373
catch (
InvalidProjectFileException
ex)
393
Assert.Throws<
InvalidProjectFileException
>(() =>
413
Assert.Throws<
InvalidProjectFileException
>(() =>
434
catch (
InvalidProjectFileException
)
901
Assert.Throws<
InvalidProjectFileException
>(() =>
946
Assert.Throws<
InvalidProjectFileException
>(() =>
988
Assert.Throws<
InvalidProjectFileException
>(() =>
1636
var
exception =
1637
Assert.Throws<
InvalidProjectFileException
>(
1803
var
exception =
1804
Assert.Throws<
InvalidProjectFileException
>(
Construction\ProjectTargetElement_Tests.cs (5)
13
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
165
Assert.Throws<
InvalidProjectFileException
>(() =>
182
Assert.Throws<
InvalidProjectFileException
>(() =>
357
var
error = Assert.Throws<
InvalidProjectFileException
>(() =>
Construction\ProjectTaskElement_Tests.cs (2)
7
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
84
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)
57
Assert.Throws<
InvalidProjectFileException
>(() =>
144
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)
18
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
730
catch (
InvalidProjectFileException
)
Definition\ProjectItem_Tests.cs (7)
18
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
785
Should.Throw<
InvalidProjectFileException
>(() => { _ = project.AddItem("i", unevaluatedInclude); });
952
Should.Throw<
InvalidProjectFileException
>(() => { ProjectInstance.FromFile(testProjectFile, new ProjectOptions()); });
1628
Assert.Throws<
InvalidProjectFileException
>(() =>
2702
Should.Throw<
InvalidProjectFileException
>(() => ObjectModelHelpers.CreateInMemoryProject(content))
2995
var
exception = Assert.Throws<
InvalidProjectFileException
>(() =>
Definition\ProjectItemDefinition_Tests.cs (9)
14
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
472
Assert.Throws<
InvalidProjectFileException
>(() =>
494
Assert.Throws<
InvalidProjectFileException
>(() =>
516
Assert.Throws<
InvalidProjectFileException
>(() =>
538
Assert.Throws<
InvalidProjectFileException
>(() =>
560
Assert.Throws<
InvalidProjectFileException
>(() =>
582
Assert.Throws<
InvalidProjectFileException
>(() =>
604
Assert.Throws<
InvalidProjectFileException
>(() =>
626
Assert.Throws<
InvalidProjectFileException
>(() =>
Instance\ProjectItemInstance_Tests.cs (2)
13
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
729
Assert.Throws<
InvalidProjectFileException
>(() =>
Microsoft.Build.Engine.UnitTests (193)
BackEnd\AssemblyTaskFactory_Tests.cs (6)
16
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
75
Assert.Throws<
InvalidProjectFileException
>(() =>
87
Assert.Throws<
InvalidProjectFileException
>(() =>
99
Assert.Throws<
InvalidProjectFileException
>(() =>
160
Assert.Throws<
InvalidProjectFileException
>(() =>
171
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)
4172
submission1.BuildResult.Exception.ShouldBeOfType<
InvalidProjectFileException
>();
4173
submission2.BuildResult.Exception.ShouldBeOfType<
InvalidProjectFileException
>();
4302
aggException.InnerExceptions[0].ShouldBeOfType<
InvalidProjectFileException
>().ProjectFile.ShouldBeOneOf(project2, project3);
4303
aggException.InnerExceptions[1].ShouldBeOfType<
InvalidProjectFileException
>().ProjectFile.ShouldBeOneOf(project2, project3);
BackEnd\IntrinsicTask_Tests.cs (12)
18
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
86
Assert.Throws<
InvalidProjectFileException
>(() =>
104
Assert.Throws<
InvalidProjectFileException
>(() =>
142
Assert.Throws<
InvalidProjectFileException
>(() =>
159
Assert.Throws<
InvalidProjectFileException
>(() =>
663
Assert.Throws<
InvalidProjectFileException
>(() =>
757
Assert.Throws<
InvalidProjectFileException
>(() =>
773
Assert.Throws<
InvalidProjectFileException
>(() =>
791
Assert.Throws<
InvalidProjectFileException
>(() =>
1603
Assert.Throws<
InvalidProjectFileException
>(() =>
2113
Assert.ThrowsAny<
InvalidProjectFileException
>(() => ExecuteTask(task, lookup))
3005
Assert.Throws<
InvalidProjectFileException
>(() =>
BackEnd\LoggingServicesLogMethod_Tests.cs (2)
19
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
181
InvalidProjectFileException
exception = new InvalidProjectFileException("ProjectFile", 1, 2, 3, 4, "Message", "errorSubCategory", "ErrorCode", "HelpKeyword");
BackEnd\MockLoggingService.cs (2)
15
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
427
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)
24
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
242
Assert.Equal(typeof(
InvalidProjectFileException
), _buildRequestCompleted_Entry.Result.Exception.GetType());
BackEnd\SdkResolverLoader_Tests.cs (14)
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")));
490
var
exception = Should.Throw<
InvalidProjectFileException
>(() =>
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
;
1138
InvalidProjectFileException
exception = Should.Throw<
InvalidProjectFileException
>(() => registry.GetRegisteredTask("Task1", "none", TaskHostParameters.Empty, false, new TargetLoggingContext(_loggingService, new BuildEventContext(1, 1, BuildEventContext.InvalidProjectContextId, 1)), ElementLocation.Create("none", 1, 2), false));
1266
Assert.Throws<
InvalidProjectFileException
>(() =>
1308
Assert.Throws<
InvalidProjectFileException
>(() =>
1350
Assert.Throws<
InvalidProjectFileException
>(() =>
1372
Assert.Throws<
InvalidProjectFileException
>(() =>
1443
Assert.Throws<
InvalidProjectFileException
>(() =>
1491
Assert.Throws<
InvalidProjectFileException
>(() =>
1538
Assert.Throws<
InvalidProjectFileException
>(() =>
1698
Assert.Throws<
InvalidProjectFileException
>(() =>
Construction\ElementLocation_Tests.cs (2)
111
catch (
InvalidProjectFileException
ex)
146
catch (
InvalidProjectFileException
ex)
Construction\SolutionFile_OldParser_Tests.cs (16)
56
Should.Throw<
InvalidProjectFileException
>(() =>
819
Should.Throw<
InvalidProjectFileException
>(() =>
836
Should.Throw<
InvalidProjectFileException
>(() =>
1213
InvalidProjectFileException
e = Should.Throw<
InvalidProjectFileException
>(() =>
1259
InvalidProjectFileException
e = Should.Throw<
InvalidProjectFileException
>(() => ParseSolutionHelper(solutionFileContents));
1780
Should.Throw<
InvalidProjectFileException
>(() =>
1806
Should.Throw<
InvalidProjectFileException
>(() =>
1832
Should.Throw<
InvalidProjectFileException
>(() =>
2300
var
exception = Should.Throw<
InvalidProjectFileException
>(parseSolution);
2344
var
exception = Should.Throw<
InvalidProjectFileException
>(parseSolution);
2390
var
exception = Should.Throw<
InvalidProjectFileException
>(parseSolution);
Construction\SolutionFilter_Tests.cs (2)
216
InvalidProjectFileException
e = Should.Throw<
InvalidProjectFileException
>(() => SolutionFile.Parse(slnf.Path));
Construction\SolutionProjectGenerator_Tests.cs (4)
20
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
789
Assert.Throws<
InvalidProjectFileException
>(() =>
1545
catch (
InvalidProjectFileException
)
2381
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)
18
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
402
Assert.Throws<
InvalidProjectFileException
>(() =>
EscapingInProjects_Tests.cs (2)
21
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
781
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
) { }
990
InvalidProjectFileException
ex = Assert.Throws<
InvalidProjectFileException
>(() =>
1065
Assert.Throws<
InvalidProjectFileException
>(() =>
3158
Assert.Throws<
InvalidProjectFileException
>(() =>
4503
catch (
InvalidProjectFileException
e)
4558
InvalidProjectFileException
ex = Assert.Throws<
InvalidProjectFileException
>(() =>
5009
Should.Throw<
InvalidProjectFileException
>(() =>
Evaluation\Expander_Tests.cs (35)
31
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
1306
catch (Microsoft.Build.Exceptions.
InvalidProjectFileException
e)
1333
catch (Microsoft.Build.Exceptions.
InvalidProjectFileException
e)
1804
Assert.Throws<
InvalidProjectFileException
>(() =>
1821
Assert.Throws<
InvalidProjectFileException
>(() =>
2395
Assert.Throws<
InvalidProjectFileException
>(() =>
2413
Assert.Throws<
InvalidProjectFileException
>(() =>
2430
Assert.Throws<
InvalidProjectFileException
>(() =>
2447
Assert.Throws<
InvalidProjectFileException
>(() =>
2465
Assert.Throws<
InvalidProjectFileException
>(() =>
2481
Assert.Throws<
InvalidProjectFileException
>(() =>
2497
Assert.Throws<
InvalidProjectFileException
>(() =>
2513
Assert.Throws<
InvalidProjectFileException
>(() =>
2701
Assert.Throws<
InvalidProjectFileException
>(() => expander.ExpandIntoStringLeaveEscaped("$([Microsoft.FOO.FileIO.FileSystem]::CurrentDirectory)", ExpanderOptions.ExpandProperties, MockElementLocation.Instance));
2702
Assert.Throws<
InvalidProjectFileException
>(() => expander.ExpandIntoStringLeaveEscaped("$([Foo.Baz]::new())", ExpanderOptions.ExpandProperties, MockElementLocation.Instance));
2703
Assert.Throws<
InvalidProjectFileException
>(() => expander.ExpandIntoStringLeaveEscaped("$([Foo]::new())", ExpanderOptions.ExpandProperties, MockElementLocation.Instance));
2704
Assert.Throws<
InvalidProjectFileException
>(() => expander.ExpandIntoStringLeaveEscaped("$([Foo.]::new())", ExpanderOptions.ExpandProperties, MockElementLocation.Instance));
2705
Assert.Throws<
InvalidProjectFileException
>(() => expander.ExpandIntoStringLeaveEscaped("$([.Foo]::new())", ExpanderOptions.ExpandProperties, MockElementLocation.Instance));
2706
Assert.Throws<
InvalidProjectFileException
>(() => expander.ExpandIntoStringLeaveEscaped("$([.]::new())", ExpanderOptions.ExpandProperties, MockElementLocation.Instance));
2707
Assert.Throws<
InvalidProjectFileException
>(() => expander.ExpandIntoStringLeaveEscaped("$([]::new())", ExpanderOptions.ExpandProperties, MockElementLocation.Instance));
3411
var
ex = Assert.Throws<
InvalidProjectFileException
>(
3517
InvalidProjectFileException
exception = Assert.Throws<
InvalidProjectFileException
>(() =>
3533
InvalidProjectFileException
exception = Assert.Throws<
InvalidProjectFileException
>(() =>
3695
Assert.Throws<
InvalidProjectFileException
>(() =>
4397
catch (
InvalidProjectFileException
ex)
4593
Assert.Throws<
InvalidProjectFileException
>(() =>
4669
Assert.Throws<
InvalidProjectFileException
>(() =>
4845
Should.Throw<
InvalidProjectFileException
>(() =>
5149
var
exception = Should.Throw<
InvalidProjectFileException
>(() =>
5190
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)
490
catch (
InvalidProjectFileException
e)
ExpressionTreeExpression_Tests.cs (1)
505
catch (
InvalidProjectFileException
ex)
Graph\GraphLoadedFromSolution_tests.cs (2)
55
var
exception = Should.Throw<
InvalidProjectFileException
>(
Graph\ProjectGraph_Tests.cs (3)
567
aggException.InnerExceptions[0].ShouldBeOfType<
InvalidProjectFileException
>();
2922
InvalidProjectFileException
exception = getTargetListsFunc.ShouldThrow<
InvalidProjectFileException
>();
InvalidProjectFileException_Tests.cs (1)
76
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)
57
catch (
InvalidProjectFileException
ex)
Utilities_Tests.cs (3)
11
using InvalidProjectFileException = Microsoft.Build.Exceptions.
InvalidProjectFileException
;
139
Assert.Throws<
InvalidProjectFileException
>(() =>
156
Assert.Throws<
InvalidProjectFileException
>(() =>
MSBuild (4)
XMake.cs (4)
845
catch (
InvalidProjectFileException
)
1692
if (exception is not
InvalidProjectFileException
1693
&& !(exception is AggregateException aggregateException && aggregateException.InnerExceptions.All(innerException => innerException is
InvalidProjectFileException
))
1726
catch (
InvalidProjectFileException
ex)