From c23dadb581ba771c8224ba7b496b5fa7696121c0 Mon Sep 17 00:00:00 2001
From: Tom Longhurst <30480171+thomhurst@users.noreply.github.com>
Date: Thu, 12 Nov 2026 16:31:50 +0000
Subject: [PATCH] fix: restore the net8.0 target for the packaged libraries
(#7739)
Since #7705, net8.0 and net9.0 projects fell back to the netstandard2.0
assets, which miss a dependency and are not Native AOT compatible. The
integration packages had no fallback at all. Ship net8.0 assets again and
cover them in the NuGet tester.
---
.github/workflows/dotnet.yml | 1 +
Directory.Packages.props | 15 +++++++++++----
eng/Library.props | 2 +-
renovate.json | 11 +++++++++++
.../TUnit.AspNetCore.Core.csproj | 2 +-
src/TUnit.AspNetCore/TUnit.AspNetCore.csproj | 2 +-
src/TUnit.Aspire.Core/TUnit.Aspire.Core.csproj | 2 +-
src/TUnit.Aspire/TUnit.Aspire.csproj | 2 +-
.../TUnit.Logging.Microsoft.csproj | 2 +-
src/TUnit.Mocks.Http/TUnit.Mocks.Http.csproj | 2 +-
.../TUnit.Mocks.Logging.csproj | 2 +-
.../TUnit.OpenTelemetry.csproj | 2 +-
.../Modules/PublishNugetTesterAOTModule.cs | 2 +-
.../Modules/TestNugetPackageModule.cs | 4 +++-
.../TUnit.NugetTester.FSharp.fsproj | 2 +-
.../TUnit.NugetTester.VB.vbproj | 2 +-
.../TUnit.NugetTester/TUnit.NugetTester.csproj | 2 +-
17 files changed, 39 insertions(+), 18 deletions(-)
diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
index 1fe2c6a84b..c5c27e4303 100644
--- a/.github/workflows/dotnet.yml
+++ b/.github/workflows/dotnet.yml
@@ -83,6 +83,7 @@ jobs:
uses: actions/setup-dotnet@v6.1.0
with:
dotnet-version: |
+ 8.0.x
10.0.x
11.0.x
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 62570e15d1..1abc9c7d0f 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -2,17 +2,24 @@
true
-
-
+
+
+
+
+
+
+
diff --git a/eng/Library.props b/eng/Library.props
index 1a0727d54d..a6e6cd564d 100644
--- a/eng/Library.props
+++ b/eng/Library.props
@@ -1,6 +1,6 @@
- netstandard2.0;net10.0;net11.0
+ netstandard2.0;net8.0;net10.0;net11.0
true
diff --git a/renovate.json b/renovate.json
index 5c773a29cc..f182edf66e 100644
--- a/renovate.json
+++ b/renovate.json
@@ -39,6 +39,17 @@
],
"allowedVersions": "<18.12.0"
},
+ {
+ "description": "Per-TFM versions in Directory.Packages.props: keep the net8.0 entries on 8.x.",
+ "matchPackageNames": [
+ "Microsoft.AspNetCore.Mvc.Testing",
+ "Microsoft.Extensions.Http",
+ "Microsoft.Extensions.Logging",
+ "Microsoft.Extensions.Logging.Abstractions"
+ ],
+ "matchCurrentVersion": "/^8\\./",
+ "allowedVersions": "<9.0.0"
+ },
{
"description": "Per-TFM versions in Directory.Packages.props: keep the net10.0/default entries on 10.x; the net11.0 entries are uncapped.",
"matchPackageNames": [
diff --git a/src/TUnit.AspNetCore.Core/TUnit.AspNetCore.Core.csproj b/src/TUnit.AspNetCore.Core/TUnit.AspNetCore.Core.csproj
index 5671f47b41..3d3091c6c8 100644
--- a/src/TUnit.AspNetCore.Core/TUnit.AspNetCore.Core.csproj
+++ b/src/TUnit.AspNetCore.Core/TUnit.AspNetCore.Core.csproj
@@ -4,7 +4,7 @@
- net10.0;net11.0
+ net8.0;net10.0;net11.0
TUnit.AspNetCore
diff --git a/src/TUnit.AspNetCore/TUnit.AspNetCore.csproj b/src/TUnit.AspNetCore/TUnit.AspNetCore.csproj
index 4f0588b7f6..7961a18356 100644
--- a/src/TUnit.AspNetCore/TUnit.AspNetCore.csproj
+++ b/src/TUnit.AspNetCore/TUnit.AspNetCore.csproj
@@ -4,7 +4,7 @@
- net10.0;net11.0
+ net8.0;net10.0;net11.0
diff --git a/src/TUnit.Aspire.Core/TUnit.Aspire.Core.csproj b/src/TUnit.Aspire.Core/TUnit.Aspire.Core.csproj
index f0bff9ceab..99328df616 100644
--- a/src/TUnit.Aspire.Core/TUnit.Aspire.Core.csproj
+++ b/src/TUnit.Aspire.Core/TUnit.Aspire.Core.csproj
@@ -3,7 +3,7 @@
- net10.0;net11.0
+ net8.0;net10.0;net11.0
TUnit.Aspire
diff --git a/src/TUnit.Aspire/TUnit.Aspire.csproj b/src/TUnit.Aspire/TUnit.Aspire.csproj
index df711cc169..fcfd17af06 100644
--- a/src/TUnit.Aspire/TUnit.Aspire.csproj
+++ b/src/TUnit.Aspire/TUnit.Aspire.csproj
@@ -3,7 +3,7 @@
- net10.0;net11.0
+ net8.0;net10.0;net11.0
diff --git a/src/TUnit.Logging.Microsoft/TUnit.Logging.Microsoft.csproj b/src/TUnit.Logging.Microsoft/TUnit.Logging.Microsoft.csproj
index a5f04a1bce..589cb2d078 100644
--- a/src/TUnit.Logging.Microsoft/TUnit.Logging.Microsoft.csproj
+++ b/src/TUnit.Logging.Microsoft/TUnit.Logging.Microsoft.csproj
@@ -3,7 +3,7 @@
- net10.0;net11.0
+ net8.0;net10.0;net11.0
diff --git a/src/TUnit.Mocks.Http/TUnit.Mocks.Http.csproj b/src/TUnit.Mocks.Http/TUnit.Mocks.Http.csproj
index 89e2547536..92e063afb7 100644
--- a/src/TUnit.Mocks.Http/TUnit.Mocks.Http.csproj
+++ b/src/TUnit.Mocks.Http/TUnit.Mocks.Http.csproj
@@ -3,7 +3,7 @@
- net10.0;net11.0
+ net8.0;net10.0;net11.0
HttpClient mocking helpers for TUnit.Mocks. Provides MockHttpHandler with fluent request matching and response configuration.
diff --git a/src/TUnit.Mocks.Logging/TUnit.Mocks.Logging.csproj b/src/TUnit.Mocks.Logging/TUnit.Mocks.Logging.csproj
index bdc9b9774f..18796d044b 100644
--- a/src/TUnit.Mocks.Logging/TUnit.Mocks.Logging.csproj
+++ b/src/TUnit.Mocks.Logging/TUnit.Mocks.Logging.csproj
@@ -3,7 +3,7 @@
- net10.0;net11.0
+ net8.0;net10.0;net11.0
ILogger verification helpers for TUnit.Mocks. Enables fluent verification of log calls without dealing with the complex Log<TState>() signature.
diff --git a/src/TUnit.OpenTelemetry/TUnit.OpenTelemetry.csproj b/src/TUnit.OpenTelemetry/TUnit.OpenTelemetry.csproj
index f418c761f2..f5355ebc9e 100644
--- a/src/TUnit.OpenTelemetry/TUnit.OpenTelemetry.csproj
+++ b/src/TUnit.OpenTelemetry/TUnit.OpenTelemetry.csproj
@@ -3,7 +3,7 @@
- net10.0;net11.0
+ net8.0;net10.0;net11.0
Auto-wires an OpenTelemetry TracerProvider for TUnit test processes. Install to get distributed tracing with zero configuration.
diff --git a/tools/TUnit.Pipeline/Modules/PublishNugetTesterAOTModule.cs b/tools/TUnit.Pipeline/Modules/PublishNugetTesterAOTModule.cs
index 630aae9d4d..4585cc61fc 100644
--- a/tools/TUnit.Pipeline/Modules/PublishNugetTesterAOTModule.cs
+++ b/tools/TUnit.Pipeline/Modules/PublishNugetTesterAOTModule.cs
@@ -38,7 +38,7 @@ protected override ModuleConfiguration Configure() => ModuleConfiguration.Create
.AssertExists();
// Test AOT publishing
- foreach (var framework in new[] { "net10.0", "net11.0" })
+ foreach (var framework in new[] { "net8.0", "net10.0", "net11.0" })
{
var result = await context.SubModule($"AOT-{framework}", async () =>
{
diff --git a/tools/TUnit.Pipeline/Modules/TestNugetPackageModule.cs b/tools/TUnit.Pipeline/Modules/TestNugetPackageModule.cs
index 7d6fbac453..c8f7d90f62 100644
--- a/tools/TUnit.Pipeline/Modules/TestNugetPackageModule.cs
+++ b/tools/TUnit.Pipeline/Modules/TestNugetPackageModule.cs
@@ -45,10 +45,12 @@ protected override IEnumerable TestableFrameworks
{
yield return "net10.0";
- // See ModernFrameworks: only Linux covers net11.0.
+ // See ModernFrameworks: only Linux covers net11.0. net8.0 is the oldest packaged
+ // modern target, so it is covered there too.
if (IsLinux)
{
yield return "net11.0";
+ yield return "net8.0";
}
if (IsWindows)
diff --git a/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester.FSharp/TUnit.NugetTester.FSharp.fsproj b/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester.FSharp/TUnit.NugetTester.FSharp.fsproj
index 4341f1d592..5ceff51cdb 100644
--- a/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester.FSharp/TUnit.NugetTester.FSharp.fsproj
+++ b/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester.FSharp/TUnit.NugetTester.FSharp.fsproj
@@ -1,7 +1,7 @@
- net6.0;net10.0;net11.0;net462;net472;net48;net481
+ net6.0;net8.0;net10.0;net11.0;net462;net472;net48;net481
latest
true
enable
diff --git a/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester.VB/TUnit.NugetTester.VB.vbproj b/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester.VB/TUnit.NugetTester.VB.vbproj
index 36b2857dcd..c670475d8b 100644
--- a/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester.VB/TUnit.NugetTester.VB.vbproj
+++ b/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester.VB/TUnit.NugetTester.VB.vbproj
@@ -1,7 +1,7 @@
- net6.0;net10.0;net11.0;net462;net472;net48;net481
+ net6.0;net8.0;net10.0;net11.0;net462;net472;net48;net481
latest
true
enable
diff --git a/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester/TUnit.NugetTester.csproj b/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester/TUnit.NugetTester.csproj
index cf367727e1..f0f030443e 100644
--- a/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester/TUnit.NugetTester.csproj
+++ b/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester/TUnit.NugetTester.csproj
@@ -1,7 +1,7 @@
- net10.0;net11.0;net462;net472;net48;net481
+ net8.0;net10.0;net11.0;net462;net472;net48;net481
latest
true
enable