Skip to content

Commit 3cb4d8e

Browse files
committed
test: fix package conditionals to use correct xunit
1 parent 83ef9b6 commit 3cb4d8e

3 files changed

Lines changed: 12 additions & 21 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Changelog
22

3+
### 2026-10-06 v6.0.1
4+
35
### 2026-10-06 v6.0.0
46

57
* **breaking** build: remove EOL target frameworks

‎Directory.Build.props‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33

44
<!--Versioning-->
5-
<VersionPrefix>6.0.0</VersionPrefix>
5+
<VersionPrefix>6.0.1</VersionPrefix>
66
<VersionSuffix></VersionSuffix>
77

88
<!-- Targets -->

‎src/NetCoreForce.Client.Tests/NetCoreForce.Client.Tests.csproj‎

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,18 @@
22
<PropertyGroup>
33
<TargetFrameworks>$(TestTargetFrameworks)</TargetFrameworks>
44
<IsPackable>false</IsPackable>
5+
<UseXunitRunnerV3 Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0')) OR $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net472'))">true</UseXunitRunnerV3>
56
</PropertyGroup>
67

7-
<Choose>
8-
9-
<When Condition="'$(TargetFramework)' == 'NET6_0_OR_GREATER'">
10-
<ItemGroup>
11-
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
12-
</ItemGroup>
13-
</When>
14-
15-
<When Condition="'$(TargetFramework)' == 'NET8_0_OR_GREATER'">
16-
<ItemGroup>
17-
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5" />
18-
</ItemGroup>
19-
</When>
20-
21-
<Otherwise>
22-
<ItemGroup>
23-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
24-
</ItemGroup>
25-
</Otherwise>
8+
<!-- xunit.runner.visualstudio 3.x requires .NET 8+ or .NET Framework 4.7.2+ -->
9+
<ItemGroup Condition=" '$(UseXunitRunnerV3)' == 'true' ">
10+
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5" />
11+
</ItemGroup>
2612

27-
</Choose>
13+
<!-- 2.8.2 is the last runner that supports .NET Framework 4.6.2 -->
14+
<ItemGroup Condition=" '$(UseXunitRunnerV3)' != 'true' ">
15+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
16+
</ItemGroup>
2817

2918
<ItemGroup>
3019
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.8.1" />

0 commit comments

Comments
 (0)