Skip to content

Commit 5907510

Browse files
ANcpLuaclaude
andcommitted
Add .NET 10 support to test project and fix CI workflow
- Added net10.0 to test project TargetFrameworks - Added conditional package reference for Microsoft.AspNetCore.Mvc.Testing 10.0.0 - Removed solution-level build step to allow per-framework restore - Each test run now handles its own restore+build+test for its target framework - All three frameworks (net8, net9, net10) now generate and merge coverage This fixes the "Assets file doesn't have a target for 'net10.0'" error by ensuring the test project actually targets .NET 10. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 8a5c710 commit 5907510

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

.github/workflows/tests.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@ jobs:
2222
9.0.x
2323
10.0.x
2424
25-
- name: Restore dependencies
26-
run: |
27-
dotnet restore SWEN3.Paperless.RabbitMq.sln
28-
29-
- name: Build
30-
run: |
31-
dotnet build SWEN3.Paperless.RabbitMq.sln --no-restore --configuration Release
32-
3325
- name: Run tests for .NET 8 with coverage
3426
run: |
3527
dotnet test SWEN3.Paperless.RabbitMq.Tests/SWEN3.Paperless.RabbitMq.Tests.csproj \

SWEN3.Paperless.RabbitMq.Tests/SWEN3.Paperless.RabbitMq.Tests.csproj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<LangVersion>latestMajor</LangVersion>
@@ -34,6 +34,11 @@
3434
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
3535
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0"/>
3636
</ItemGroup>
37+
38+
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
39+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.0"/>
40+
</ItemGroup>
41+
3742
<ItemGroup>
3843
<ProjectReference Include="..\SWEN3.Paperless.RabbitMq\SWEN3.Paperless.RabbitMq.csproj"/>
3944
</ItemGroup>

0 commit comments

Comments
 (0)