Skip to content
Latchkey

.NET SDK Version Not Found on the Runner in CI

CI runners ship a specific set of preinstalled SDKs that changes over time. When your build needs a version that is not in that set, commands fail or silently use the wrong SDK. Install the exact version explicitly instead of assuming the runner has it.

What this error means

The build errors that the requested SDK is not installed, or quietly uses a different SDK than intended (subtle behavior differences). Tied to the runner image's preinstalled SDK set.

dotnet
The specified SDK version '9.0.100' could not be found. Installed SDKs:
8.0.404 [/usr/share/dotnet/sdk]

Common causes

The runner image does not include the version

The preinstalled SDK set on the runner does not contain the requested version, so it is unavailable.

Reliance on whatever is preinstalled

The workflow never pins a version, so it drifts as the runner image updates.

How to fix it

Install the exact SDK with setup-dotnet

  1. Add an explicit actions/setup-dotnet step with the precise version.
  2. List multiple versions if you build several TFMs.
  3. Re-run.
workflow setup
- uses: actions/setup-dotnet@v4
  with:
    dotnet-version: |
      8.0.x
      9.0.x

Pin via global.json for reproducibility

  1. Commit a global.json pinning the SDK and install it with global-json-file.
  2. This keeps local and CI on the same SDK.
  3. Re-run.

How to prevent it

  • Always install the SDK explicitly; never rely on the runner default.
  • Pin the SDK with global.json and install from it.
  • On self-managed runners, prebake the SDKs your builds need.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →