diff --git a/.editorconfig b/.editorconfig
index bc2d6e84a..cfdab13ec 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -466,6 +466,7 @@ dotnet_diagnostic.BL0004.severity = none
dotnet_diagnostic.BL0005.severity = none
dotnet_diagnostic.BL0006.severity = none
dotnet_diagnostic.BL0007.severity = none
+dotnet_diagnostic.BL0010.severity = none
##########################################
# Custom Test Code Analyzers Rules
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 41e987244..1d91c9b23 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -47,6 +47,7 @@ jobs:
8.0.x
9.0.x
10.0.x
+ 11.0.x
- name: ⚙️ Setup GIT versioning
uses: dotnet/nbgv@v0.4.2
@@ -128,6 +129,7 @@ jobs:
8.0.x
9.0.x
10.0.x
+ 11.0.x
- name: ⚙️ Restore packages and tools
run: |
@@ -159,7 +161,7 @@ jobs:
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
- 9.0.x
+ 10.0.x
- uses: actions/download-artifact@v7
with:
@@ -222,6 +224,7 @@ jobs:
8.0.x
9.0.x
10.0.x
+ 11.0.x
- name: ⚙️ Setup GIT versioning
uses: dotnet/nbgv@v0.4.2
diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml
index ce8f2a843..263333728 100644
--- a/.github/workflows/docs-deploy.yml
+++ b/.github/workflows/docs-deploy.yml
@@ -76,6 +76,7 @@ jobs:
8.0.x
9.0.x
10.0.x
+ 11.0.x
- name: 🎨 Setup color
run: |
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 165efa684..1c54e7ae0 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -66,6 +66,7 @@ jobs:
8.0.x
9.0.x
10.0.x
+ 11.0.x
- name: 🛠️ Update changelog
uses: thomaseizinger/keep-a-changelog-new-release@3.1.0
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1e32dedf7..3250b5f6d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,7 +6,9 @@ All notable changes to **bUnit** will be documented in this file. The project ad
## [Unreleased]
-## [2.5.3] - 2026-01-21
+### Added
+
+- net11.0 support
## [2.5.3] - 2026-01-08
diff --git a/Directory.Packages.props b/Directory.Packages.props
index bf8561613..720f03d11 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -71,6 +71,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/samples/components/bunit.docs.samples.csproj b/docs/samples/components/bunit.docs.samples.csproj
index 8d0c766a6..88949209f 100644
--- a/docs/samples/components/bunit.docs.samples.csproj
+++ b/docs/samples/components/bunit.docs.samples.csproj
@@ -1,7 +1,7 @@
- net8.0;net9.0;net10.0
+ net8.0;net9.0;net10.0;net11.0
Bunit.Docs.Samples
enable
CA1014,NU5104
diff --git a/docs/samples/tests/Directory.Build.props b/docs/samples/tests/Directory.Build.props
index 487c917d1..8071ce9d1 100644
--- a/docs/samples/tests/Directory.Build.props
+++ b/docs/samples/tests/Directory.Build.props
@@ -1,6 +1,6 @@
- net8.0;net9.0;net10.0
+ net8.0;net9.0;net10.0;net11.0
false
true
false
diff --git a/src/bunit.template/template/.template.config/template.json b/src/bunit.template/template/.template.config/template.json
index 81e3820c6..90eab74ea 100644
--- a/src/bunit.template/template/.template.config/template.json
+++ b/src/bunit.template/template/.template.config/template.json
@@ -91,7 +91,7 @@
"description": "The target framework sdk for the project.",
"displayName": "Target framework sdk",
"datatype": "choice",
- "defaultValue": "net9.0",
+ "defaultValue": "net10.0",
"replaces": "targetSdk",
"choices": [
{
@@ -103,6 +103,16 @@
"choice": "net9.0",
"description": ".net 9.0",
"displayName": ".net 9.0"
+ },
+ {
+ "choice": "net10.0",
+ "description": ".net 10.0",
+ "displayName": ".net 10.0"
+ },
+ {
+ "choice": "net11.0",
+ "description": ".net 11.0",
+ "displayName": ".net 11.0"
}
]
}
diff --git a/src/bunit.web.query/bunit.web.query.csproj b/src/bunit.web.query/bunit.web.query.csproj
index d684833d3..c0e9bc642 100644
--- a/src/bunit.web.query/bunit.web.query.csproj
+++ b/src/bunit.web.query/bunit.web.query.csproj
@@ -1,7 +1,7 @@
- net8.0;net9.0;net10.0
+ net8.0;net9.0;net10.0;net11.0
Bunit
Bunit.Web.Query
diff --git a/src/bunit/TestDoubles/Authorization/BunitAuthorizationExtensions.cs b/src/bunit/TestDoubles/Authorization/BunitAuthorizationExtensions.cs
index 3bf3677f1..8fad2d81d 100644
--- a/src/bunit/TestDoubles/Authorization/BunitAuthorizationExtensions.cs
+++ b/src/bunit/TestDoubles/Authorization/BunitAuthorizationExtensions.cs
@@ -15,10 +15,12 @@ public partial class BunitContext
public BunitAuthorizationContext AddAuthorization()
{
Services.AddCascadingAuthenticationState();
+#if !NET11_0_OR_GREATER
Services.AddSingleton();
#pragma warning disable CS0618
Services.AddSingleton(s => s.GetRequiredService());
#pragma warning restore CS0618
+#endif
var authCtx = new BunitAuthorizationContext(Services);
return authCtx;
}
diff --git a/src/bunit/TestDoubles/NavigationManager/BunitSignOutSessionStateManager.cs b/src/bunit/TestDoubles/NavigationManager/BunitSignOutSessionStateManager.cs
index b84699201..af6d78ecf 100644
--- a/src/bunit/TestDoubles/NavigationManager/BunitSignOutSessionStateManager.cs
+++ b/src/bunit/TestDoubles/NavigationManager/BunitSignOutSessionStateManager.cs
@@ -1,4 +1,5 @@
-using Microsoft.AspNetCore.Components.WebAssembly.Authentication;
+#if !NET11_0_OR_GREATER
+using Microsoft.AspNetCore.Components.WebAssembly.Authentication;
namespace Bunit.TestDoubles;
@@ -38,3 +39,4 @@ public override Task ValidateSignOutState()
return Task.FromResult(wasSignedOut);
}
}
+#endif
diff --git a/src/bunit/bunit.csproj b/src/bunit/bunit.csproj
index 3a5511a05..8712df6b9 100644
--- a/src/bunit/bunit.csproj
+++ b/src/bunit/bunit.csproj
@@ -1,6 +1,6 @@
- net8.0;net9.0;net10.0
+ net8.0;net9.0;net10.0;net11.0
Bunit
diff --git a/tests/bunit.generators.tests/bunit.generators.tests.csproj b/tests/bunit.generators.tests/bunit.generators.tests.csproj
index a59629e50..28d889510 100644
--- a/tests/bunit.generators.tests/bunit.generators.tests.csproj
+++ b/tests/bunit.generators.tests/bunit.generators.tests.csproj
@@ -1,7 +1,7 @@
- net8.0;net9.0;net10.0
+ net8.0;net9.0;net10.0;net11.0
Bunit
Bunit.Generator.Tests
true
diff --git a/tests/bunit.testassets/BlazorE2E/ElementRefComponent.razor b/tests/bunit.testassets/BlazorE2E/ElementRefComponent.razor
index 5a2316837..b3f52d69d 100644
--- a/tests/bunit.testassets/BlazorE2E/ElementRefComponent.razor
+++ b/tests/bunit.testassets/BlazorE2E/ElementRefComponent.razor
@@ -31,6 +31,6 @@
async Task MakeInteropCall()
{
- await JSRuntime.InvokeAsync
+
+
+
+
\ No newline at end of file
diff --git a/tests/bunit.tests/TestDoubles/BunitSignOutSessionStateManagerTest.cs b/tests/bunit.tests/TestDoubles/BunitSignOutSessionStateManagerTest.cs
index 0460d7a75..03a40bf7a 100644
--- a/tests/bunit.tests/TestDoubles/BunitSignOutSessionStateManagerTest.cs
+++ b/tests/bunit.tests/TestDoubles/BunitSignOutSessionStateManagerTest.cs
@@ -1,3 +1,4 @@
+#if !NET11_0_OR_GREATER
namespace Bunit.TestDoubles;
public class BunitSignOutSessionStateManagerTest : BunitContext
@@ -27,3 +28,4 @@ public async Task ShouldReturnSignOutStateOnValidateSignOutState()
cut.IsSignedOut.ShouldBeFalse();
}
}
+#endif
\ No newline at end of file
diff --git a/tests/bunit.tests/bunit.tests.csproj b/tests/bunit.tests/bunit.tests.csproj
index 45f6e8727..638453b1a 100644
--- a/tests/bunit.tests/bunit.tests.csproj
+++ b/tests/bunit.tests/bunit.tests.csproj
@@ -1,7 +1,7 @@
- net8.0;net9.0;net10.0
+ net8.0;net9.0;net10.0;net11.0
Bunit
Bunit.Tests
diff --git a/tests/bunit.web.query.tests/bunit.web.query.tests.csproj b/tests/bunit.web.query.tests/bunit.web.query.tests.csproj
index 0c625097d..dc2b89628 100644
--- a/tests/bunit.web.query.tests/bunit.web.query.tests.csproj
+++ b/tests/bunit.web.query.tests/bunit.web.query.tests.csproj
@@ -1,7 +1,7 @@
- net8.0;net9.0;net10.0
+ net8.0;net9.0;net10.0;net11.0
Bunit
Bunit.Web.Query.Tests