Visual Studio Test Explorer hangs indefinitely on .NET 10 xUnit project, but dotnet test passes

4 weeks ago 10
ARTICLE AD BOX

enter image description hereenter image description here

Problem Description: I am working on a simple console application (Advent of Code) using .NET 10. I have set up an xUnit test project.

The Issue: When I try to run tests in Visual Studio's Test Explorer, the icons just spin indefinitely (or remain blue/not run). It never completes.

The Catch: When I run dotnet test in the terminal, all tests pass successfully.

Environment:

Visual Studio 2026

Target Framework: .net10.0

xUnit Version: 2.9.3

xUnit Runner Visual Studio: I have tried both 3.1.4 and 2.8.2.

My .csproj file:

<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net10.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> <IsPackable>false</IsPackable> </PropertyGroup> <ItemGroup> <PackageReference Include="coverlet.collector" Version="6.0.4" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" /> <PackageReference Include="xunit" Version="2.9.3" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\AoC\AoC.csproj" /> </ItemGroup> <ItemGroup> <Using Include="Xunit" /> </ItemGroup> </Project>

What I have tried so far:

Clean / Rebuild Solution.

Deleted .vs, bin, and obj folders manually and restarted Visual Studio.

Downgraded xunit.runner.visualstudio from v3.x to v2.8.2 to match the xUnit version.

Checked "Use previews of the .NET SDK" in Tools -> Options (although the interface seems different in my version).

Verified that tests satisfy criteria (public class, public methods, [Fact] attribute).

Despite dotnet test reporting success, Test Explorer refuses to show the results.

Is there a known issue with .NET 10 and the current Test Explorer?

Read Entire Article