Skip to content
Latchkey

dotnet "NETSDK1141: Unable to resolve the .NET SDK version" in CI

NETSDK1141 means the build host could not resolve the SDK version global.json asks for - the requested version (and any roll-forward) does not map to an installed SDK. The build stops before any project work.

What this error means

A build fails with NETSDK1141 saying the SDK version in global.json could not be resolved. It is deterministic on that runner because the pinned SDK simply is not resolvable from what is installed.

dotnet build output
error NETSDK1141: Unable to resolve the .NET SDK version as specified in the
global.json located at /home/runner/work/app/global.json.

Common causes

Pinned SDK not installed and not roll-forwardable

The exact version (or feature band) in global.json is absent and the rollForward policy will not bridge to an installed SDK, so resolution fails.

Malformed or unexpected global.json

A global.json with an unparseable version, or an allowPrerelease/rollForward combination that excludes every installed SDK, leaves nothing to resolve.

How to fix it

Install the SDK global.json pins

Have CI install exactly the version the file requires.

.github/workflows/ci.yml
- uses: actions/setup-dotnet@v4
  with:
    global-json-file: global.json

Relax the roll-forward policy

Allow rolling forward to a newer installed feature band so a close install resolves.

global.json
{
  "sdk": { "version": "8.0.400", "rollForward": "latestFeature" }
}

How to prevent it

  • Install the SDK from global.json with setup-dotnet so resolution always succeeds.
  • Use a tolerant rollForward so patch/feature-band drift does not break resolution.
  • Validate global.json parses and lists a version your runners can satisfy.

Related guides

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