Skip to content
Latchkey

GitHub Actions actions/setup-dotnet "Could not find SDK"

actions/setup-dotnet drives dotnet-install to fetch SDKs from the .NET release feeds. A version or channel with no matching SDK for the runner platform fails the install.

What this error means

A setup-dotnet step fails resolving the SDK, often after requesting a version that has no published build or a channel that does not exist.

github-actions
Error: Could not find any version matching 9.0.999 in channel.
dotnet-install: Could not find SDK with the specified version.

Common causes

SDK version not published

A non-existent patch or a prerelease band that is not yet released has no entry in the .NET feed.

global.json pins a missing SDK

A global.json sdk.version that the runner cannot satisfy makes setup-dotnet (or the build) fail to find a usable SDK.

How to fix it

Use a valid channel or version

  1. Set dotnet-version to a major.minor (e.g. 8.0.x) so setup-dotnet selects the newest published patch.
  2. If you use global.json, align rollForward or the pinned version with an available SDK.
  3. Confirm the version exists in the .NET release feed.
.github/workflows/ci.yml
- uses: actions/setup-dotnet@v4
  with:
    dotnet-version: '8.0.x'

How to prevent it

  • Prefer a major.minor band (8.0.x) over an exact patch.
  • Set rollForward in global.json to tolerate patch differences.
  • Latchkey managed runners auto-retry the SDK download on transient feed failures.

Frequently asked questions

What causes ""setup-dotnet SDK not found""?
A non-existent patch or a prerelease band that is not yet released has no entry in the .NET feed.
How do I fix "setup-dotnet SDK not found"?
Use a valid channel or version

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card