msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

Add build check result errors into the list of build submission IDs that have logged error

Open JaynieBai opened this issue 1 year ago • 1 comments

Fixes #10071

Context

While building with buildcheck enabled and MSBUILDNOINPROCNODE=1 Severity of the rule set to Error, does not reported to the all build: image This is since buildcheck error is not added into the _warningsAsErrorsByProject, WarningsAsErrors == null && _warningsAsErrorsByProject == null is true all the time. so HasBuildSubmissionLoggedErrors always return false. https://github.com/dotnet/msbuild/blob/843bfa584a08401b30e4c0b21a3c0b534568877e/src/Build/BackEnd/Components/Logging/LoggingService.cs#L578-L586

Changes Made

when buildEventArgs is BuildErrorEventArgs, treat BuildErrorEventArgs' related warnings as errors

Testing

Notes

JaynieBai avatar Jun 12 '24 06:06 JaynieBai

Will add a test after figured out the reason of flaky test SampleAnalyzerIntegrationTest https://github.com/dotnet/msbuild/issues/10036

JaynieBai avatar Jun 12 '24 08:06 JaynieBai