From 1fe5712571f1e1eac579d08431d668013265c84b Mon Sep 17 00:00:00 2001 From: John Korsnes Date: Sat, 12 Sep 2026 15:01:04 +0200 Subject: [PATCH 1/2] Target net10.0/net11.0, upgrade xunit v4, modernize CI - Narrow TargetFrameworks to net10.0;net11.0 (drop net8.0/net9.0) - Bump actions/checkout to v7, actions/setup-dotnet to v6 (split into separate GA/preview steps so dotnet-quality: preview no longer forces .NET 10 off its GA channel), gittools/actions to v4.7.0 - Upgrade Microsoft.NET.Test.Sdk, xunit.v3 and xunit.runner.visualstudio to their new major versions, which require opting into the new MTP dotnet test runner via global.json (also pins the min SDK, rolling forward to the newest installed major so it keeps working once .NET 11 leaves RC) - Add renovate.json to keep NuGet/Actions versions from going stale again Co-Authored-By: Claude Sonnet 5 --- .github/workflows/CI.yml | 11 +++++-- .github/workflows/PreRelease.yml | 15 ++++++--- .github/workflows/Release.yml | 15 ++++++--- global.json | 10 ++++++ renovate.json | 32 +++++++++++++++++++ source/NoCommons.Tests/NoCommons.Tests.csproj | 9 +++--- source/NoCommons/NoCommons.csproj | 2 +- 7 files changed, 75 insertions(+), 19 deletions(-) create mode 100644 global.json create mode 100644 renovate.json diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 79d1a01..0244ff7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,11 +7,16 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 - - name: Setup .NET - uses: actions/setup-dotnet@v5 + - uses: actions/checkout@v7 + - name: Setup .NET 10 + uses: actions/setup-dotnet@v6 with: dotnet-version: 10.0.x + - name: Setup .NET 11 (preview) + uses: actions/setup-dotnet@v6 + with: + dotnet-version: 11.0.x + dotnet-quality: 'preview' - name: Restore dependencies run: dotnet restore source - name: Build diff --git a/.github/workflows/PreRelease.yml b/.github/workflows/PreRelease.yml index 67dacf5..9515377 100644 --- a/.github/workflows/PreRelease.yml +++ b/.github/workflows/PreRelease.yml @@ -8,21 +8,26 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v7 with: fetch-depth: 0 - - name: Setup .NET - uses: actions/setup-dotnet@v5 + - name: Setup .NET 10 + uses: actions/setup-dotnet@v6 with: dotnet-version: 10.0.x + - name: Setup .NET 11 (preview) + uses: actions/setup-dotnet@v6 + with: + dotnet-version: 11.0.x + dotnet-quality: 'preview' - run: echo "ACTIONS_ALLOW_UNSECURE_COMMANDS=true" >> $GITHUB_ENV - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v4.2.0 + uses: gittools/actions/gitversion/setup@v4.7.0 with: versionSpec: "6.x" - name: Determine Version id: gitversion - uses: gittools/actions/gitversion/execute@v4.2.0 + uses: gittools/actions/gitversion/execute@v4.7.0 with: useConfigFile: true - name: Pack diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index b51bfae..f376f0f 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -8,21 +8,26 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v7 with: fetch-depth: 0 - - name: Setup .NET - uses: actions/setup-dotnet@v5 + - name: Setup .NET 10 + uses: actions/setup-dotnet@v6 with: dotnet-version: 10.0.x + - name: Setup .NET 11 (preview) + uses: actions/setup-dotnet@v6 + with: + dotnet-version: 11.0.x + dotnet-quality: 'preview' - run: echo "ACTIONS_ALLOW_UNSECURE_COMMANDS=true" >> $GITHUB_ENV - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v4.2.0 + uses: gittools/actions/gitversion/setup@v4.7.0 with: versionSpec: "6.x" - name: Determine Version id: gitversion - uses: gittools/actions/gitversion/execute@v4.2.0 + uses: gittools/actions/gitversion/execute@v4.7.0 with: useConfigFile: true - name: Pack diff --git a/global.json b/global.json new file mode 100644 index 0000000..67b0c9d --- /dev/null +++ b/global.json @@ -0,0 +1,10 @@ +{ + "sdk": { + "version": "10.0.100", + "rollForward": "latestMajor", + "allowPrerelease": true + }, + "test": { + "runner": "Microsoft.Testing.Platform" + } +} diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..66d74f1 --- /dev/null +++ b/renovate.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended", + ":semanticCommitsDisabled" + ], + "timezone": "Europe/Oslo", + "schedule": [ + "before 6am on monday" + ], + "labels": [ + "dependencies" + ], + "packageRules": [ + { + "matchManagers": ["nuget"], + "groupName": "NuGet dependencies", + "minimumReleaseAge": "3 days" + }, + { + "matchManagers": ["github-actions"], + "groupName": "GitHub Actions", + "minimumReleaseAge": "3 days" + }, + { + "matchManagers": ["github-actions"], + "matchPackageNames": ["actions/checkout", "actions/setup-dotnet"], + "automerge": true, + "automergeType": "branch" + } + ] +} diff --git a/source/NoCommons.Tests/NoCommons.Tests.csproj b/source/NoCommons.Tests/NoCommons.Tests.csproj index ce9f24f..09e0043 100644 --- a/source/NoCommons.Tests/NoCommons.Tests.csproj +++ b/source/NoCommons.Tests/NoCommons.Tests.csproj @@ -1,12 +1,11 @@  - net8.0;net9.0;net10.0 + net10.0;net11.0 enable enable true Exe - true @@ -14,9 +13,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers diff --git a/source/NoCommons/NoCommons.csproj b/source/NoCommons/NoCommons.csproj index d06c8e4..ba83dee 100644 --- a/source/NoCommons/NoCommons.csproj +++ b/source/NoCommons/NoCommons.csproj @@ -1,6 +1,6 @@  - net8.0;net9.0;net10.0 + net10.0;net11.0 enable enable NoCommons From 91dbc31133e91207564dd010654a93adf3698fd4 Mon Sep 17 00:00:00 2001 From: John Korsnes Date: Sat, 12 Sep 2026 15:06:57 +0200 Subject: [PATCH 2/2] Use a build matrix for CI instead of sequential SDK installs Each matrix leg installs only the SDK/runtime it needs (10.0.x GA, 11.0.x preview) and scopes restore/build/test to that single TargetFramework via -p:TargetFrameworks=, avoiding the earlier NETSDK1045 failure that occurs when a lower SDK sees a TargetFrameworks list containing a newer TFM it doesn't understand. Legs run in parallel instead of two sequential setup-dotnet steps in one job. +semver: major This branch drops net8.0/net9.0 support from NoCommons, a breaking change for consumers on those TFMs. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/CI.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0244ff7..04829af 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -6,20 +6,25 @@ jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + include: + - framework: net10.0 + dotnet-version: 10.0.x + - framework: net11.0 + dotnet-version: 11.0.x + dotnet-quality: preview + steps: - uses: actions/checkout@v7 - - name: Setup .NET 10 - uses: actions/setup-dotnet@v6 - with: - dotnet-version: 10.0.x - - name: Setup .NET 11 (preview) + - name: Setup .NET uses: actions/setup-dotnet@v6 with: - dotnet-version: 11.0.x - dotnet-quality: 'preview' + dotnet-version: ${{ matrix.dotnet-version }} + dotnet-quality: ${{ matrix.dotnet-quality }} - name: Restore dependencies - run: dotnet restore source + run: dotnet restore source -p:TargetFrameworks=${{ matrix.framework }} - name: Build - run: dotnet build --no-restore source + run: dotnet build --no-restore source -p:TargetFrameworks=${{ matrix.framework }} - name: Test - run: dotnet test --no-build --verbosity normal source + run: dotnet test --no-build --verbosity normal source -p:TargetFrameworks=${{ matrix.framework }}