Skip to content

Emit assemblyName payload for FallbackAssemblyLoad EventSource events#14014

Open
AR-May wants to merge 1 commit into
dotnet:mainfrom
AR-May:fix/fallback-assembly-load-eventsource-payload
Open

Emit assemblyName payload for FallbackAssemblyLoad EventSource events#14014
AR-May wants to merge 1 commit into
dotnet:mainfrom
AR-May:fix/fallback-assembly-load-eventsource-payload

Conversation

@AR-May

@AR-May AR-May commented Jun 10, 2026

Copy link
Copy Markdown
Member

Context

FallbackAssemblyLoadStart and FallbackAssemblyLoadStop events declare an assemblyName parameter but call WriteEvent without it. The payload is dropped before reaching ETW, so every trace consumer sees an empty payload.

Testing

Existing unit tests

FallbackAssemblyLoadStart/Stop (events 97/98) declared an assemblyName
parameter but called WriteEvent(97)/WriteEvent(98) without passing it,
so the payload was silently dropped in ETW/EventPipe traces.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 10, 2026 08:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes MSBuild’s Microsoft-Build EventSource so FallbackAssemblyLoadStart/Stop (EventIds 97/98) actually emit their declared assemblyName payload to ETW/EventPipe, instead of dropping it due to calling WriteEvent without arguments.

Changes:

  • Pass assemblyName into WriteEvent(97, ...) for FallbackAssemblyLoadStart.
  • Pass assemblyName into WriteEvent(98, ...) for FallbackAssemblyLoadStop.

Comment on lines 701 to 711
[Event(97, Keywords = Keywords.All)]
public void FallbackAssemblyLoadStart(string assemblyName)
{
WriteEvent(97);
WriteEvent(97, assemblyName);
}

[Event(98, Keywords = Keywords.All)]
public void FallbackAssemblyLoadStop(string assemblyName)
{
WriteEvent(98);
WriteEvent(98, assemblyName);
}
@@ -701,13 +701,13 @@ public void OutOfProcNodeShutDownStop(string shutdownReason)
[Event(97, Keywords = Keywords.All)]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version does not need bumping because we do not change the method signature, it is the writer that was out of sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants