[main] Source code updates from dotnet/dotnet#12886
Merged
YuliiaKovalova merged 3 commits intomainfrom Dec 8, 2025
Merged
Conversation
[[ commit created by automation ]]
No dependency updates to commit
YuliiaKovalova
approved these changes
Dec 8, 2025
This was referenced Dec 10, 2025
YuliiaKovalova
pushed a commit
that referenced
this pull request
Jan 19, 2026
I'm seeing this exception:
```
System.TypeInitializationException: The type initializer for 'Microsoft.Build.Eventing.MSBuildEventSource' threw an exception.
---> System.MissingMethodException: Method not found: 'Void System.Diagnostics.Tracing.EventSource..ctor(System.String, System.Guid)'.
at Microsoft.Build.Eventing.MSBuildEventSource..ctor()
at Microsoft.Build.Eventing.MSBuildEventSource..ctor()
at Microsoft.Build.Eventing.MSBuildEventSource..cctor()
--- End of inner exception stack trace ---
at Microsoft.Build.Graph.ProjectGraph.<>c__DisplayClass41_0.<.ctor>g__BeginMeasurement|1()
at Microsoft.Build.Graph.ProjectGraph..ctor(IEnumerable`1 entryPoints, ProjectCollection projectCollection, ProjectInstanceFactoryFunc projectInstanceFactory, Int32 degreeOfParallelism, CancellationToken cancellationToken)
at Microsoft.Build.Graph.ProjectGraph..ctor(IEnumerable`1 entryPoints, ProjectCollection projectCollection, ProjectInstanceFactoryFunc projectInstanceFactory)
```
In ILSpy I see Microsoft.Build.Framework.dll
`18.3.0-preview-26055-101+e64f84d6312cdaf227d26aeabfa4817862404d59`
having:
```cs
private MSBuildEventSource()
: base("Microsoft-Build", new Guid(3561627800u, 33311, 22536, 76, 234, 30, 36, 233, 130, 202, 55))
{
}
```
But in `C:\Program
Files\dotnet\shared\Microsoft.NETCore.App\10.0.1\System.Private.CoreLib.dll`
(loaded in .NET 10) I see:
```cs
internal EventSource(Guid eventSourceGuid, string eventSourceName)
: this(eventSourceGuid, eventSourceName, EventSourceSettings.EtwManifestEventFormat)
{
}
```
It's both internal and the args are backwards...
I believe this was introduced in #12886.
Which pulls in this change:
dotnet/runtime#121180
That seems to introduce a source generator which calls the internal ctor
of EventSource (and with different order). As that's internal to .NET, I
expect it was not intended to be applied here in MSBuild.
This change simply reverts the change to `MSBuildEventSource`.
Co-authored-by: AR-May <67507805+AR-May@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This is a codeflow update. It may contain both source code changes from
the VMR
as well as dependency updates. Learn more here.
This pull request brings the following source code changes
From https://github.com/dotnet/dotnet
Associated changes in source repos