Skip to content

Build the pipelines on the .NET 10 SDK - #4

Merged
TarasKovalenko merged 1 commit into
mainfrom
fix/dotnet-10-pipelines
Aug 24, 2026
Merged

Build the pipelines on the .NET 10 SDK#4
TarasKovalenko merged 1 commit into
mainfrom
fix/dotnet-10-pipelines

Conversation

@TarasKovalenko

@TarasKovalenko TarasKovalenko commented Aug 24, 2026

Copy link
Copy Markdown
Owner

The release workflow fails before it does anything:

Error: Failed to install dotnet, exit code: 1.
dotnet_install: Error: Could not find `.NET Core SDK` with version = 9.0.0

global.json asks for SDK 9.0.0. That version does not exist and never has — the 9.0 band starts at 9.0.100.

It has been harmless up to now because rollForward quietly lands on whatever 9.0.1xx happens to be installed. actions/setup-dotnet reads the pin literally when you give it a global-json-file, and release.yml gives it one, so the workflow dies at the setup step.

What this does

Rather than correct the pin to a real 9.0 patch, move to 10.0.100 and have both workflows install 10.0.x directly.

The .NET 10 SDK compiles net8.0 and net9.0 too, so one SDK is enough and the 8.0.x / 9.0.x installs come out of every job. The test projects already carry RollForward=Major, so their net9.0 hosts start fine on the .NET 10 runtime and nothing else has to change.

-      # The tool multi-targets net8.0/net9.0/net10.0, so every SDK has to be present.
+      # The .NET 10 SDK builds every framework the tool targets, so one SDK is enough.
       - uses: actions/setup-dotnet@v4
         with:
-          global-json-file: global.json
-          dotnet-version: |
-            8.0.x
-            9.0.x
-            10.0.x
+          dotnet-version: 10.0.x

Verification

Ran on a machine with only the .NET 10 SDK present (10.0.301, 10.0.400), with bin/ and obj/ wiped first so nothing was reused:

dotnet --version              10.0.400
dotnet restore                ok
dotnet build -c Release       Build succeeded, no warnings
dotnet test  -c Release       334 passed, 0 failed
dotnet pack  --no-build       CentralConfigGenerator.2.0.0.nupkg

The package still ships tools/net8.0, tools/net9.0 and tools/net10.0.

Four files, no source changes.

The release workflow fails before it does anything:

  Error: Failed to install dotnet, exit code: 1.
  dotnet_install: Error: Could not find `.NET Core SDK` with version = 9.0.0

global.json asks for SDK 9.0.0. That version does not exist and never has —
the 9.0 band starts at 9.0.100. It has been harmless up to now because
rollForward quietly lands on whatever 9.0.1xx is installed, but
actions/setup-dotnet reads the pin literally when it is given a
global-json-file, and release.yml gives it one.

Rather than correct the pin to a real 9.0 patch, move to 10.0.100 and have
both workflows install 10.0.x directly. The .NET 10 SDK compiles net8.0 and
net9.0 as well, so one SDK is enough and the 8.0.x and 9.0.x installs come
out of every job. The test projects already roll forward to whatever
runtime is present, so nothing else has to change.

Verified on a machine with only the .NET 10 SDK, with bin/ and obj/ wiped
first: restore, build, test and pack --no-build all succeed, and the
package still ships tools for net8.0, net9.0 and net10.0.
@TarasKovalenko
TarasKovalenko force-pushed the fix/dotnet-10-pipelines branch from 5a27c4b to 98331c0 Compare August 24, 2026 08:37
@TarasKovalenko TarasKovalenko changed the title Build on the .NET 10 SDK Build the pipelines on the .NET 10 SDK Aug 24, 2026
@TarasKovalenko
TarasKovalenko merged commit c0f913c into main Aug 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant