Fix Tests

The issue was two things:

  1. Missing xunit.runner.visualstudio package — xunit v3 needs this
adapter for VSTest (dotnet test) to discover tests
  2. <OutputType>Exe</OutputType> — this is for xunit v3's standalone
runner mode (dotnet run), but it conflicts with dotnet test discovery.
Removed it since you want dotnet test to work.
This commit is contained in:
Canon
2026-03-12 15:58:19 +08:00
parent dc108bdff7
commit 4c56c5183c
@@ -6,13 +6,13 @@
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject> <IsTestProject>true</IsTestProject>
<OutputType>Exe</OutputType>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
<PackageReference Include="NSubstitute" Version="5.3.0" /> <PackageReference Include="NSubstitute" Version="5.3.0" />
<PackageReference Include="xunit.v3" Version="3.1.0" /> <PackageReference Include="xunit.v3" Version="3.1.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>