diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a52b66ad..ef9c5bd63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -161,7 +161,7 @@ jobs: uses: actions/setup-dotnet@v6 with: dotnet-version: | - 10.0.x + 11.0.x - uses: actions/download-artifact@v8 with: @@ -213,6 +213,11 @@ jobs: dotnet restore ${{ github.workspace }}/TemplateTestMstest --source https://api.nuget.org/v3/index.json --source ${{ env.NUGET_DIRECTORY }} cd ${{ github.workspace }}/TemplateTestMstest && dotnet test + - name: ✔ Verify template --sdk option + run: | + dotnet new bunit --sdk net10.0 --no-restore -o ${{ github.workspace }}/TemplateTestSdk + grep -q 'net10.0' ${{ github.workspace }}/TemplateTestSdk/TemplateTestSdk.csproj + validate-docs: runs-on: ubuntu-latest steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a1a3fa0c..dde71493d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,19 @@ All notable changes to **bUnit** will be documented in this file. The project ad ## [Unreleased] +### Added + +- Support for .NET 11 GA. The `net11.0` target now references the final .NET 11 packages and is compiled with runtime async. By [@linkdotnet](https://github.com/linkdotnet). + +### Changed + +- The `bunit.template` now targets `net11.0` by default. +- Updated AngleSharp to 1.10.1 and AngleSharp.Css to 1.4.1. + +### Fixed + +- The `bunit.template` option to choose the target framework is now `--sdk` as documented, instead of `--targetSdk`. By [@linkdotnet](https://github.com/linkdotnet). + ## [2.14.0] - 2026-11-06 ### Changed diff --git a/Directory.Build.props b/Directory.Build.props index 432358349..7680649d9 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -25,6 +25,10 @@ ../../key.snk + + $(Features);runtime-async=on + + AllEnabledByDefault true diff --git a/Directory.Packages.props b/Directory.Packages.props index 0bc564c3a..ca5ce9937 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -8,7 +8,7 @@ - + @@ -18,8 +18,8 @@ - - + + @@ -72,18 +72,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + @@ -117,6 +117,6 @@ - + diff --git a/docs/site/docs/getting-started/create-test-project.md b/docs/site/docs/getting-started/create-test-project.md index a3b526ada..530b411f8 100644 --- a/docs/site/docs/getting-started/create-test-project.md +++ b/docs/site/docs/getting-started/create-test-project.md @@ -74,6 +74,12 @@ The `--framework` option in the `dotnet new` command above is used to specify th - `nunit` - [NUnit](https://nunit.org/), - `mstest` - [MSTest](https://docs.microsoft.com/en-us/dotnet/core/testing/unit-testing-with-mstest) +The `--sdk` option sets the target framework of the test project. If omitted, `net11.0` is used. Supported options are `net8.0`, `net9.0`, `net10.0`, and `net11.0`, e.g.: + +```dotnetcli +dotnet new bunit --framework xunitv3 --sdk net10.0 -o +``` + **3. Add the test project to your solution** If using Visual Studio, add the test project to your solution (`.sln`), and add a reference between the test project and the project containing the components that should be tested: diff --git a/src/bunit.template/template/.template.config/dotnetcli.host.json b/src/bunit.template/template/.template.config/dotnetcli.host.json index ced81d900..364881b5c 100644 --- a/src/bunit.template/template/.template.config/dotnetcli.host.json +++ b/src/bunit.template/template/.template.config/dotnetcli.host.json @@ -8,15 +8,15 @@ "longName": "framework", "shortName": "" }, - "TargetSdk": { + "targetSdk": { "longName": "sdk", "shortName": "" } }, "usageExamples": [ - "--framework xunit --sdk net8.0", - "--framework xunitv3 --sdk net8.0", - "--framework nunit --sdk net8.0", - "--framework mstest --sdk net8.0" + "--framework xunit --sdk net11.0", + "--framework xunitv3 --sdk net11.0", + "--framework nunit --sdk net11.0", + "--framework mstest --sdk net11.0" ] } diff --git a/src/bunit.template/template/.template.config/template.json b/src/bunit.template/template/.template.config/template.json index 90eab74ea..bfef5a5ac 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": "net10.0", + "defaultValue": "net11.0", "replaces": "targetSdk", "choices": [ { diff --git a/version.json b/version.json index 9b441c7de..bfaebb016 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json", - "version": "2.14", + "version": "2.15", "assemblyVersion": { "precision": "revision" },