Closed layomia closed 1 year ago
Callstack of NRE:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Build.Logging.StructuredLogger.MessageProcessor.Process(BuildMessageEventArgs args) in C:\src\KirillOsenkov\MSBuildStructuredLog\src\StructuredLogger\Construction\MessageProcessor.cs:line 50
at Microsoft.Build.Logging.StructuredLogger.Construction.MessageRaised(Object sender, BuildMessageEventArgs args) in C:\src\KirillOsenkov\MSBuildStructuredLog\src\StructuredLogger\Construction\Construction.cs:line 455
It would seem that BuildEventContext here is null.
can you email me the binlog?
Oops, never mind, I was on the phone and didn't see it.
I will publish the fix soon and will discuss with the MSBuild team, I feel like they should not be logging a message with a null BuildEventContext.
Indeed we shouldn't have been: https://github.com/dotnet/msbuild/pull/8509.
I was working on new targets in the dotnet/runtime repo (https://github.com/dotnet/runtime/pull/82179/commits/490c00d71f11c145e74280621fb8c2915d855543) and noticed that the viewer was showing a null ref when I opened the binlog produced when building my project. I was using a recent nightly build of the .NET 8 sdk (8.0.100-preview.3.23156.3-win-x64) and the latest version of the viewer (2.1.787). cc @ericstj
msbuild.zip