Updating track to .NET 11

Upgrading the track to .NET 11 is pretty straightforward since VB doesn’t receive new language features so we’re frozen at Visual Basic 17.13.

1 Like

https://vslive.com/blogs/news-and-tips/2026/10/wait-who-moved-my-dotnet-test.aspx

Hmm, it looks like we need to move away from VSTest to the modern MTP testing engine so this will involve a bit of research first.

Before digging in, it may be worth checking which test framework version the track pins. If it’s still on xUnit v2, the newer platform needs an adapter or a jump to v3, which supports it natively; the same question applies to whatever assertions/runner packages the VB exercises use. The VB angle is the part I’d verify early, since the adapter and any source generators have to cope with VB’s more limited language surface. If v3 turns out to be awkward from VB, staying on the old runner for now and migrating separately might be the lower-risk path.

We’ve been on xUnit v3 for over a year so that’s not an issue. VSTest is supported on xUnit v2 and v3 so we don’t need to worry about compatibility. dotnet test falls back to VSTest if no runner is provided. so we would have been fine doing a small targeted update had I not also wanted to update xUnit v3.

In the 4.x releases for xUnit v3, MTP v2 is enabled by default instead of VSTest. .NET 11 (and for the record .NET 10) blocks VSTest from running if the test project contains MTP v2. So xUnit and the SDK are not seeing eye to eye on how to run our tests. We could either explicitly tell dotnet test to use MTP, likely requiring adding a global.json file added, OR we use a xUnit v3 release from the 4.x series that doesn’t have MTP v2. The latter strategy was chosen, and we’ll revisit that later. MTP is a modern replacement that runs faster so it’s a worthwhile goal, but it requires some coordination.

The xunit.runner.visualstudio runner is separate from the xunit.assert assertion library. The runner does interact with dotnet test so if we changed how dotnet test ran, we may have had to take a closer look at that package. The assertion library only talks to the runner, not dotnet test so there’s no need for an adapter at all.

Not true. xUnit uses runtime reflection on the compiled code so the original .NET language doesn’t matter.