Skip to content

[Bug]: MissingFieldException for Latest migration analyser in VS2026 #6157

Description

@robertcoltheart

Description

At random parts of coding, I get an exception showing up in the VS IDE with the below error message:

MissingFieldException: Field not found 'TUnit.Analyzers.Rules.MSTestMigration'
    at TUnit.Analyzers.CodeFixers.MSTestMigrationCodeFixProvider.get_DiagnosticId()
    at TUnit.Analyzers.CodeFixers.Base.BaseMigrationCodeFixProvider.get_FixableDiagnosticIds()
...

I also get a similar error for NUnitMigration analyser too.

Expected Behavior

No exceptions

Actual Behavior

Very regular exceptions

Steps to Reproduce

Create normal tests and save file.

TUnit Version

Latest

.NET Version

.net 9

Operating System

Windows

IDE / Test Runner

Visual Studio

Error Output / Stack Trace

Additional Context

No response

IDE-Specific Issue?

  • I've confirmed this issue occurs when running via dotnet test or dotnet run, not just in my IDE

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions