Skip to content

Restore Microsoft.Build binary compatibility for relocated communication types#13805

Closed
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-msb4236-sdk-not-found
Closed

Restore Microsoft.Build binary compatibility for relocated communication types#13805
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-msb4236-sdk-not-found

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 18, 2026

Work item (Internal use):

Summary

MSB4236 regressions were triggered by relocating communication/XMake types from Microsoft.Build to Microsoft.Build.Framework without forwarding legacy type identities. In mixed-load host scenarios (notably MSBuildLocator-based hosts), this can surface as SDK resolver fallthrough and MSB4236.

  • Type-forwarder restoration
    • Added missing TypeForwardedTo entries in src/Build/AssemblyInfo.cs for:
      • Microsoft.Build.Internal.Handshake
      • Microsoft.Build.Internal.HandshakeComponents
      • Microsoft.Build.Internal.HandshakeOptions
      • Microsoft.Build.Internal.HandshakeStatus
      • Microsoft.Build.Internal.ServerNodeHandshake
      • Microsoft.Build.BackEnd.INodePacket
      • Microsoft.Build.BackEnd.NodePacketType
      • Microsoft.Build.BackEnd.NodePacketTypeExtensions
      • Microsoft.Build.Internal.CommunicationsUtilities
      • Microsoft.Build.Shared.XMakeAttributes
      • Microsoft.Build.Shared.XMakeElements
  • Regression coverage
    • Added src/Build.UnitTests/BackEnd/TypeForwarding_Tests.cs to assert these forwarded identities are present in typeof(BuildManager).Assembly.GetForwardedTypes().
[assembly: TypeForwardedTo(typeof(Microsoft.Build.Internal.Handshake))]
[assembly: TypeForwardedTo(typeof(Microsoft.Build.BackEnd.INodePacket))]
[assembly: TypeForwardedTo(typeof(Microsoft.Build.Shared.XMakeElements))]

Customer Impact

Restores binary compatibility for hosts that still resolve these type tokens against Microsoft.Build.dll, preventing resolver-chain TypeLoadException paths that manifest as false SDK-not-found (MSB4236) failures.

Regression?

Yes. Introduced when types were moved from Microsoft.Build to Microsoft.Build.Framework without matching forwarders.

Testing

Added a focused unit test validating that the expected forwarded types are emitted by Microsoft.Build.

Risk

Low. Scope is limited to assembly-level type forwarding metadata and targeted compatibility test coverage.

@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Hello @copilot, I noticed that you’re changing an .swr file or any file under src/Package/MSBuild.VSSetup.. Please make sure to validate this change by an experimental VS insertion. This is accomplished by pushing to an exp/* branch, which requires write permissions to this repo.

Copilot AI and others added 2 commits May 18, 2026 18:39
Agent-Logs-Url: https://github.com/dotnet/msbuild/sessions/f3218ee8-4a20-4398-bd9c-47583a627d43

Co-authored-by: baronfel <573979+baronfel@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix MSB4236 SDK-not-found regression for MSBuildLocator Restore Microsoft.Build binary compatibility for relocated communication types May 18, 2026
Copilot AI requested a review from baronfel May 18, 2026 18:42
@DustinCampbell
Copy link
Copy Markdown
Member

@baronfel: I think this can be closed with #13804.

@baronfel baronfel closed this May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants