59 references to Errors
Microsoft.Build.CommandLine.UnitTests (2)
TerminalLogger_Tests.cs (2)
753mockLogFromPlaybackWithoutTL.Errors.Count.ShouldBe(mockLogFromPlaybackWithTL.Errors.Count);
Microsoft.Build.Engine.OM.UnitTests (2)
Definition\Project_Tests.cs (2)
2064mockLogger.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." 4279foreach (var error in logger.Errors)
Microsoft.Build.Engine.UnitTests (43)
BackEnd\GenerateTemporaryTargetAssembly_Tests.cs (1)
35logger.Errors.First().Message.ShouldBe("Task successfully failed.");
BackEnd\LoggingService_Tests.cs (4)
736BuildErrorEventArgs actualBuildEvent = logger.Errors.ShouldHaveSingleItem(); 786logger.Errors.ShouldHaveSingleItem(); 874BuildErrorEventArgs actualBuildEvent = logger.Errors.ShouldHaveSingleItem(); 905logger.Errors.ShouldHaveSingleItem();
BackEnd\LoggingServicesLogMethod_Tests.cs (1)
474List<BuildErrorEventArgs> errors = mockLogger.Errors;
BackEnd\OnError_Tests.cs (1)
591logger.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)
328Assert.Single(logger.Errors); 329BuildErrorEventArgs error = logger.Errors[0]; 1062Assert.True(buildResult, String.Join(Environment.NewLine, logger.Errors.Select(beea => beea.Message))); 2054Assert.Empty(logger.Errors);
Graph\IsolateProjects_Tests.cs (18)
172logger.Errors.ShouldBeEmpty(); 184logger.Errors.ShouldBeEmpty(); 210logger.Errors.First() 213logger.Errors.First().BuildEventContext.ShouldNotBe(BuildEventContext.Invalid); 215logger.Errors.First().BuildEventContext.NodeId.ShouldNotBe(BuildEventContext.InvalidNodeId); 216logger.Errors.First().BuildEventContext.ProjectInstanceId.ShouldNotBe(BuildEventContext.InvalidProjectInstanceId); 217logger.Errors.First().BuildEventContext.ProjectContextId.ShouldNotBe(BuildEventContext.InvalidProjectContextId); 218logger.Errors.First().BuildEventContext.TargetId.ShouldNotBe(BuildEventContext.InvalidTargetId); 219logger.Errors.First().BuildEventContext.TaskId.ShouldNotBe(BuildEventContext.InvalidTaskId); 234logger.Errors.ShouldBeEmpty(); 256logger.Errors.ShouldBeEmpty(); 353rootLogger.Errors.ShouldBeEmpty(); 354declaredReferenceLogger.Errors.ShouldBeEmpty(); 383logger.Errors.ShouldBeEmpty(); 404logger.Errors.ShouldBeEmpty(); 423logger.Errors.First().Message.ShouldStartWith("MSB4254:"); 440logger.Errors.First().Message.ShouldStartWith("MSB4254:"); 496logger.Errors.ShouldBeEmpty();
Graph\ProjectGraph_Tests.cs (1)
1618string project1ErrorMessage = project1MockLogger.Errors.First().Message;
Graph\ResultCacheBasedBuilds_Tests.cs (10)
116_logger.Errors.First().Message.ShouldContain("MSB4255:"); 398results["1"].Logger.Errors.First().Message.ShouldContain("MSB4252"); 400results["1"].Logger.Errors.First().BuildEventContext.NodeId.ShouldNotBe(BuildEventContext.InvalidNodeId); 401results["1"].Logger.Errors.First().BuildEventContext.ProjectInstanceId.ShouldNotBe(BuildEventContext.InvalidProjectInstanceId); 402results["1"].Logger.Errors.First().BuildEventContext.ProjectContextId.ShouldNotBe(BuildEventContext.InvalidProjectContextId); 403results["1"].Logger.Errors.First().BuildEventContext.TargetId.ShouldNotBe(BuildEventContext.InvalidTargetId); 404results["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)
223BuildErrorEventArgs actualEvent = logger.Errors.FirstOrDefault();
Microsoft.Build.Tasks.UnitTests (9)
CodeTaskFactoryTests.cs (1)
1229BuildErrorEventArgs error = mockLogger.Errors.FirstOrDefault();
MSBuildInternalMessage_Tests.cs (6)
59logger.Errors[0].RawMessage.ShouldBe(expectedBuildMessage); 97logger.Errors[0].RawMessage.ShouldBe(expectedBuildMessage); 159logger.Errors[0].RawMessage.ShouldBe(expectedBuildMessage); 166logger.Errors[0].RawMessage.ShouldBe(expectedBuildMessage); 175logger.Errors[0].RawMessage.ShouldBe(expectedBuildMessage); 232logger.Errors[0].RawMessage.ShouldBe(expectedBuildMessage);
ProjectExtensionsImportTestBase.cs (1)
231logger.Errors.Select(i => i.Code).FirstOrDefault().ShouldBe("MSB3540");
SGen_Tests.cs (1)
45logger.Errors.First().Code.ShouldBe("MSB3474");
Microsoft.Build.UnitTests.Shared (3)
MockLogger.cs (1)
301Errors.Add(e);
ObjectModelHelpers.cs (2)
1520mockLogger.Errors[0].Code.ShouldBe("MSB5029"); 1521mockLogger.Errors[0].Message.ShouldContain(testProjectFile);