62 references to Code
Microsoft.Arcade.Test.Common (1)
MockEngine.cs (1)
49_output?.WriteLine($"warning {e.Code}: {e.Message}");
Microsoft.Build (16)
BackEnd\Components\Logging\LoggingService.cs (11)
1569extWarningEvent.Code, 1591warningEvent.Code, 1615extWarningEvent.Code, 1636warningEvent.Code, 1951if (WarningsAsMessages?.Contains(warningEvent.Code) == true) 1961return codesByProject?.Contains(warningEvent.Code) == true; 1972return WarningsNotAsErrors?.Contains(warningEvent.Code) != true && !(_warningsNotAsErrorsByProject?.TryGetValue(key, out ISet<string> notToError) == true && notToError.Contains(warningEvent.Code)); 1986if ((WarningsAsErrors.Count == 0 && WarningAsErrorNotOverriden(warningEvent)) || WarningsAsErrors.Contains(warningEvent.Code)) 2005((codesByProject.Count == 0 && (codesToIgnoreByProject is null || !codesToIgnoreByProject.Contains(warningEvent.Code))) 2006|| codesByProject.Contains(warningEvent.Code));
EventArgsFormatting.cs (3)
44e.Code, e.File, showProjectFile ? e.ProjectFile : null, e.LineNumber, e.EndLineNumber, 109e.Code, e.File, null, e.LineNumber, e.EndLineNumber, 126e.Code, e.File, showProjectFile ? e.ProjectFile : null, e.LineNumber, e.EndLineNumber,
Logging\BinaryLogger\BuildEventArgsWriter.cs (1)
514WriteDeduplicatedString(e.Code);
LogMessagePacketBase.cs (1)
913string code = buildWarningEventArgs.Code;
Microsoft.Build.Engine.OM.UnitTests (1)
Definition\Project_Tests.cs (1)
2129collectionLogger.Warnings[0].Code.ShouldBe("MSB4011"); // "Log should contain MSB4011 because the project collection logger should have been used for evaluation."
Microsoft.Build.Engine.UnitTests (17)
BackEnd\BatchingEngine_Tests.cs (2)
420Assert.Equal("high", log.Warnings[0].Code); 421Assert.Null(log.Warnings[1].Code);
BackEnd\LoggingService_Tests.cs (8)
730BuildWarningEventForTreatAsErrorOrMessageTests.Code, 738Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.Code, actualBuildEvent.Code); 814BuildWarningEventForTreatAsErrorOrMessageTests.Code, 823Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.Code, actualBuildEvent.Code); 868BuildWarningEventForTreatAsErrorOrMessageTests.Code, 876Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.Code, actualBuildEvent.Code); 921BuildWarningEventForTreatAsErrorOrMessageTests.Code, 930Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.Code, actualBuildEvent.Code);
BackEnd\SdkResolverService_Tests.cs (3)
104_logger.Warnings.First().Code.ShouldStartWith("MSB4241"); 323_logger.Warnings.First().Code.ShouldBe("MSB4240"); 537_logger.Warnings.First().Code.ShouldStartWith("MSB4241");
BuildEventArgsSerialization_Tests.cs (2)
385e => e.Code, 423e => e.Code,
Construction\SolutionProjectGenerator_Tests.cs (1)
323Assert.Equal(code, warning.Code);
WarningsAsMessagesAndErrors_Tests.cs (1)
240Assert.Equal(ExpectedEventCode, actualEvent.Code);
Microsoft.Build.Framework.UnitTests (2)
CustomEventArgSerialization_Tests.cs (2)
510newGenericEvent.Code.ShouldBe(genericEvent.Code, StringCompareShould.IgnoreCase); // "Expected Code to Match"
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (1)
TestUtilities\MockEngine.cs (1)
36var msg = $"WARNING {eventArgs.Code}: {eventArgs.Message}";
Microsoft.Build.Tasks.UnitTests (1)
ProjectExtensionsImportTestBase.cs (1)
258logger.Warnings.Select(i => i.Code).FirstOrDefault().ShouldBe("MSB3539");
Microsoft.Build.UnitTests.Shared (6)
BuildEventArgsExtension.cs (2)
195if (!String.Equals(args.Code, other.Code, StringComparison.OrdinalIgnoreCase))
MockEngine.cs (1)
118message += "WARNING " + eventArgs.Code + ": ";
MockLogger.cs (2)
283if (w.Code != "MSB4056" && !w.Message.Contains("MSB4056")) 285string logMessage = $"{w.File}({w.LineNumber},{w.ColumnNumber}): {w.Subcategory} warning {w.Code}: {w.Message}";
ObjectModelHelpers.cs (1)
1525mockLogger.Warnings[0].Code.ShouldBe("MSB5029");
Microsoft.Build.Utilities.Core (3)
EventArgsFormatting.cs (3)
44e.Code, e.File, showProjectFile ? e.ProjectFile : null, e.LineNumber, e.EndLineNumber, 109e.Code, e.File, null, e.LineNumber, e.EndLineNumber, 126e.Code, e.File, showProjectFile ? e.ProjectFile : null, e.LineNumber, e.EndLineNumber,
Microsoft.Build.Utilities.UnitTests (2)
TrackedDependencies\MockEngine.cs (2)
63Console.Write("WARNING " + eventArgs.Code + ": "); 64Log += "WARNING " + eventArgs.Code + ": ";
Microsoft.DotNet.ArcadeLogging (1)
PipelinesLogger.cs (1)
198LogErrorOrWarning(isError: false, e.File, e.LineNumber, e.ColumnNumber, e.Code, e.Message, e.BuildEventContext);
Microsoft.DotNet.NuGetRepack.Tests (1)
ReplacePackagePartsTests.cs (1)
40AssertEx.Equal(Array.Empty<string>(), engine.LogWarningEvents.Select(w => $"{w.Code}: {w.Message}"));
Microsoft.DotNet.SignTool.Tests (2)
FakeBuildEngine.cs (1)
119_output.WriteLine($"warning {e.Code}: {e.Message}");
SignToolTests.cs (1)
371engine.LogWarningEvents.Select(w => $"{w.Code}: {w.Message}").Should().BeEquivalentTo(expectedWarnings ?? Array.Empty<string>());
MSBuild (6)
EventArgsFormatting.cs (3)
44e.Code, e.File, showProjectFile ? e.ProjectFile : null, e.LineNumber, e.EndLineNumber, 109e.Code, e.File, null, e.LineNumber, e.EndLineNumber, 126e.Code, e.File, showProjectFile ? e.ProjectFile : null, e.LineNumber, e.EndLineNumber,
LogMessagePacketBase.cs (1)
913string code = buildWarningEventArgs.Code;
TerminalLogger\TerminalLogger.cs (2)
933IsImmediateWarning(e.Code)) 1129code: AnsiCodes.Colorize(e.Code, TerminalColor.Yellow),
MSBuildTaskHost (1)
LogMessagePacketBase.cs (1)
913string code = buildWarningEventArgs.Code;
XmlFileLogger (1)
XmlFileLogger.cs (1)
68_build.AddMessage(args, string.Format("Warning {0}: {1}", args.Code, args.Message));