Repository navigation
Description
Describe the bug
The Microsoft.Testing.Extensions.Telemetry.AppInsightsProvider.<IngestLoopAsync>d__18.MoveNext method was compiled against a Void Polyfills.Polyfill.Deconstruct(System.Collections.Generic.KeyValuePair2<!!0,!!1>, !!0 ByRef, !!1 ByRef)'` method which no longer exists.
My guess is that these two methods belong to two assemblies, and that the polyfill assembly (mistakenly) only declares its polyfill APIs when targeting older runtimes. But if a netstandard2.0 target of that assembly declared the polyfill, a .NET target of that assembly must retain that declaration or other assemblies will fail like this.
Version used
MTP 2.3.0
Steps To Reproduce
You can see it here from this simple PR that upgrades MTP dependencies from 2.2.3 to 2.3.0.
Expected behavior
A successful test run.
Actual behavior
Running dotnet test fails:
dotnet test
Running tests from bin\Library.Tests\Debug\net8.0\Library.Tests.dll (net8.0|x64)
bin\Library.Tests\Debug\net472\Library.Tests.exe (net472) Zero tests ran
Exit code: -532462766
Error output:
Unhandled Exception: System.MissingMethodException: Method not found: 'Void Polyfills.Polyfill.Deconstruct(System.Collections.Generic.KeyValuePair`2<!!0,!!1>, !!0 ByRef, !!1 ByRef)'.
at Microsoft.Testing.Extensions.Telemetry.AppInsightsProvider.<IngestLoopAsync>d__18.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Testing.Extensions.Telemetry.AppInsightsProvider.IngestLoopAsync()
at Microsoft.Testing.Platform.Helpers.SystemTask.<>c__DisplayClass3_0.<RunLongRunning>b__0() in /_/src/Platform/Microsoft.Testing.Platform/Helpers/System/SystemTask.cs:line 43
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
bin\Library.Tests\Debug\net8.0\Library.Tests.dll (net8.0|x64) passed (347ms)
Test run summary: Failed!
error: 1
total: 1
failed: 0
succeeded: 1
skipped: 0
duration: 622ms
Test run completed with non-success exit code: -532462766 (see: https://aka.ms/testingplatform/exitcodes)
Activity
Youssef1313 commentedon Jul 7, 2026
We dropped Polyfill from this repo, so this will happen whenever an old extension version that used Polyfill via IVT (before Polyfill added EmbeddedAttribute support) is used along with a newer version of core MTP (after Polyfill was dropped).
There should have been few version gaps between the two to reduce the friction here (I don't recall the exact version numbers for every event involved here but I can look it up along with all the relevant PRs if needed). But looks like xunit.v3 haven't updated MTP in a while.
The easiest fix here is to explicitly add a dependency on Microsoft.Testing.Extensions.Telemetry and align it to the same core MTP version (2.3.0)
Youssef1313 commentedon Jul 7, 2026
Note that xunit/xunit#3510 was never even released.
AArnott commentedon Jul 7, 2026
I'm using xunit.v3.mtp-v2 v3.2.2 in the repro repo. That seems to be the latest version there.
As you say though, explicitly pinning Microsoft.Testing.Extensions.Telemetry to 2.3.0 solves the problem. Thank you.
lyuma commentedon Jul 8, 2026
That zip file contains malware, so make sure you did not download it.
CC Youssef Fahmy (@Youssef1313) Amaury Levé (@Evangelink) The same style comment "Man, that ... is a total headache. I ran into the same thing with ... " showed up on 4 issues at godotengine/godot today, all with malware.
The above actor is using newly-registered GitHub bot accounts to spam several prominent GitHub projects with zip files that contain malware. it may be good to edit remove the link / keep your eye out for more such bots.
Evangelink commentedon Jul 8, 2026
I'll release 2.3.1 with that
Add MTP 2.3.1 section for forward-compat crash fix (#9739 / #9710)
Fix forward-compat crash loading old 2.x extensions on .NET Framework (…
Fix forward-compat crash loading old 2.x extensions on .NET Framework (…
Unhandled Exception: System.MissingMethodException: Method not foundcodecoverage#228 as a duplicate of this issuePin Microsoft.Testing.Extensions.Telemetry
Bump Microsoft.Testing.Extensions.CodeCoverage from 18.8.0 to 18.9.0
Bump Microsoft.Testing.Extensions.CodeCoverage from 18.8.0 to 18.9.0
Bump Microsoft.Testing.Extensions.CodeCoverage from 18.8.0 to 18.9.0