59 references to Errors
Microsoft.Build.CommandLine.UnitTests (2)
TerminalLogger_Tests.cs (2)
753
mockLogFromPlaybackWithoutTL.
Errors
.Count.ShouldBe(mockLogFromPlaybackWithTL.
Errors
.Count);
Microsoft.Build.Engine.OM.UnitTests (2)
Definition\Project_Tests.cs (2)
2064
mockLogger.
Errors
[0].Code.ShouldBe("MSB4112"); // "Security message about disabled targets need to have code MSB4112, because code in the VS Core project system depends on this. See DesignTimeBuildFeedback.cpp."
4279
foreach (var error in logger.
Errors
)
Microsoft.Build.Engine.UnitTests (43)
BackEnd\GenerateTemporaryTargetAssembly_Tests.cs (1)
35
logger.
Errors
.First().Message.ShouldBe("Task successfully failed.");
BackEnd\LoggingService_Tests.cs (4)
736
BuildErrorEventArgs actualBuildEvent = logger.
Errors
.ShouldHaveSingleItem();
786
logger.
Errors
.ShouldHaveSingleItem();
874
BuildErrorEventArgs actualBuildEvent = logger.
Errors
.ShouldHaveSingleItem();
905
logger.
Errors
.ShouldHaveSingleItem();
BackEnd\LoggingServicesLogMethod_Tests.cs (1)
474
List<BuildErrorEventArgs> errors = mockLogger.
Errors
;
BackEnd\OnError_Tests.cs (1)
591
logger.
Errors
.First().Code.ShouldBe("MSB4181");
BackEnd\SdkResolverService_Tests.cs (1)
70
_logger.
Errors
[0].Message.ShouldBe(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("FailedToResolveSDK", "notfound", string.Join($"{Environment.NewLine} ", new[] {
BackEnd\TargetBuilder_Tests.cs (1)
1378
_mockLogger.
Errors
[0].Message.ShouldBe(errorMessage);
Construction\SolutionProjectGenerator_Tests.cs (4)
328
Assert.Single(logger.
Errors
);
329
BuildErrorEventArgs error = logger.
Errors
[0];
1062
Assert.True(buildResult, String.Join(Environment.NewLine, logger.
Errors
.Select(beea => beea.Message)));
2054
Assert.Empty(logger.
Errors
);
Graph\IsolateProjects_Tests.cs (18)
172
logger.
Errors
.ShouldBeEmpty();
184
logger.
Errors
.ShouldBeEmpty();
210
logger.
Errors
.First()
213
logger.
Errors
.First().BuildEventContext.ShouldNotBe(BuildEventContext.Invalid);
215
logger.
Errors
.First().BuildEventContext.NodeId.ShouldNotBe(BuildEventContext.InvalidNodeId);
216
logger.
Errors
.First().BuildEventContext.ProjectInstanceId.ShouldNotBe(BuildEventContext.InvalidProjectInstanceId);
217
logger.
Errors
.First().BuildEventContext.ProjectContextId.ShouldNotBe(BuildEventContext.InvalidProjectContextId);
218
logger.
Errors
.First().BuildEventContext.TargetId.ShouldNotBe(BuildEventContext.InvalidTargetId);
219
logger.
Errors
.First().BuildEventContext.TaskId.ShouldNotBe(BuildEventContext.InvalidTaskId);
234
logger.
Errors
.ShouldBeEmpty();
256
logger.
Errors
.ShouldBeEmpty();
353
rootLogger.
Errors
.ShouldBeEmpty();
354
declaredReferenceLogger.
Errors
.ShouldBeEmpty();
383
logger.
Errors
.ShouldBeEmpty();
404
logger.
Errors
.ShouldBeEmpty();
423
logger.
Errors
.First().Message.ShouldStartWith("MSB4254:");
440
logger.
Errors
.First().Message.ShouldStartWith("MSB4254:");
496
logger.
Errors
.ShouldBeEmpty();
Graph\ProjectGraph_Tests.cs (1)
1618
string project1ErrorMessage = project1MockLogger.
Errors
.First().Message;
Graph\ResultCacheBasedBuilds_Tests.cs (10)
116
_logger.
Errors
.First().Message.ShouldContain("MSB4255:");
398
results["1"].Logger.
Errors
.First().Message.ShouldContain("MSB4252");
400
results["1"].Logger.
Errors
.First().BuildEventContext.NodeId.ShouldNotBe(BuildEventContext.InvalidNodeId);
401
results["1"].Logger.
Errors
.First().BuildEventContext.ProjectInstanceId.ShouldNotBe(BuildEventContext.InvalidProjectInstanceId);
402
results["1"].Logger.
Errors
.First().BuildEventContext.ProjectContextId.ShouldNotBe(BuildEventContext.InvalidProjectContextId);
403
results["1"].Logger.
Errors
.First().BuildEventContext.TargetId.ShouldNotBe(BuildEventContext.InvalidTargetId);
404
results["1"].Logger.
Errors
.First().BuildEventContext.TaskId.ShouldNotBe(BuildEventContext.InvalidTaskId);
570
_logger.
Errors
.First().Message.ShouldContain("MSB4255:");
571
_logger.
Errors
.First().Message.ShouldContain("FileDoesNotExist1");
572
_logger.
Errors
.First().Message.ShouldContain("FileDoesNotExist2");
WarningsAsMessagesAndErrors_Tests.cs (1)
223
BuildErrorEventArgs actualEvent = logger.
Errors
.FirstOrDefault();
Microsoft.Build.Tasks.UnitTests (9)
CodeTaskFactoryTests.cs (1)
1229
BuildErrorEventArgs error = mockLogger.
Errors
.FirstOrDefault();
MSBuildInternalMessage_Tests.cs (6)
59
logger.
Errors
[0].RawMessage.ShouldBe(expectedBuildMessage);
97
logger.
Errors
[0].RawMessage.ShouldBe(expectedBuildMessage);
159
logger.
Errors
[0].RawMessage.ShouldBe(expectedBuildMessage);
166
logger.
Errors
[0].RawMessage.ShouldBe(expectedBuildMessage);
175
logger.
Errors
[0].RawMessage.ShouldBe(expectedBuildMessage);
232
logger.
Errors
[0].RawMessage.ShouldBe(expectedBuildMessage);
ProjectExtensionsImportTestBase.cs (1)
231
logger.
Errors
.Select(i => i.Code).FirstOrDefault().ShouldBe("MSB3540");
SGen_Tests.cs (1)
45
logger.
Errors
.First().Code.ShouldBe("MSB3474");
Microsoft.Build.UnitTests.Shared (3)
MockLogger.cs (1)
301
Errors
.Add(e);
ObjectModelHelpers.cs (2)
1520
mockLogger.
Errors
[0].Code.ShouldBe("MSB5029");
1521
mockLogger.
Errors
[0].Message.ShouldContain(testProjectFile);