Skip to content

Fix forward-compat crash loading old 2.x extensions on .NET Framework (#9710) by @Evangelink in #9739 (backport to rel/4.3)#9740

Merged
Evangelink merged 1 commit into
microsoft:rel/4.3from
nohwnd-bot:backport/9739/to/rel/4.3
Jul 8, 2026
Merged

Fix forward-compat crash loading old 2.x extensions on .NET Framework (#9710) by @Evangelink in #9739 (backport to rel/4.3)#9740
Evangelink merged 1 commit into
microsoft:rel/4.3from
nohwnd-bot:backport/9739/to/rel/4.3

Conversation

@nohwnd-bot

Copy link
Copy Markdown

Backport of #9739 to rel/4.3

/cc @Evangelink

…microsoft#9710)

A newer Microsoft.Testing.Platform combined with an older (2.x) extension whose
netstandard2.0 asset was compiled against the platform's internal Polyfills.Polyfill
helper (shared via InternalsVisibleTo) threw MissingMethodException in
AppInsightsProvider.IngestLoopAsync on .NET Framework, crashing the process.

- Restore the exact Polyfills.Polyfill members old 2.x extensions reference
  (Deconstruct, Contains x2, AppendJoin x2, CopyToAsync, SaveAsync), guarded to the
  non-.NET-Core TFMs so they land only in the netstandard2.0 platform asset that is
  loaded on .NET Framework. The type is already internal with IVT to the extensions;
  [Embedded] only hides it from new compile-time references, so the CLR still resolves
  old baked MemberRefs at runtime.
- Add TelemetryForwardCompatibilityTests reproducing the crash: current platform +
  oldest supported 2.x telemetry extension (2.0.0) on net462 with telemetry enabled.
  Verified red without the shim (exit code -532462766) and green with it.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Evangelink Evangelink enabled auto-merge (squash) July 8, 2026 15:00
Evangelink added a commit that referenced this pull request Jul 8, 2026
New 2.3.1 UNRELEASED servicing section for the .NET Framework MissingMethodException regression (#9710) fixed by #9739, being backported to rel/4.3 via #9740.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Evangelink Evangelink disabled auto-merge July 8, 2026 16:46
@Evangelink Evangelink merged commit 79f26ff into microsoft:rel/4.3 Jul 8, 2026
8 of 11 checks passed
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