Skip to content

System.MissingMethodException after upgrade to 2.3.0 #9710

Closed

Description

@AArnott

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

  1. added
    needs/triage
    on Jul 7, 2026
  2. Youssef1313 commented on Jul 7, 2026

    @Youssef1313
    Member

    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)

  3. Youssef1313 commented on Jul 7, 2026

    @Youssef1313
    Member

    Note that xunit/xunit#3510 was never even released.

  4. AArnott commented on Jul 7, 2026

    @AArnott
    MemberAuthor

    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.

  5. removed
    needs/triage
    on Jul 7, 2026
  6. lyuma commented on Jul 8, 2026

    @lyuma

    #9710 (comment) Man, that missing method error is a total headache. I ran into the same thing with the polyfill mismatch on net8.0. I ended up swapping the faulty assembly with a patched version that keeps the deconstruct signature intact for the runtime.

    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.

  7. Evangelink commented on Jul 8, 2026

    @Evangelink
    Member

    I'll release 2.3.1 with that

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

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions