NETSDK1045 .NET Origin: Application & API Last updated 13 Oct 2026

error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0. Either target .NET 7.0 or lower, or use a version of the .NET SDK that supports .NET 8.0

The installed .NET SDK is older than the project’s TargetFramework.

Exact message you may see The current .NET SDK does not support targetingNETSDK1141 Unable to resolve the .NET SDK version as specified in the global.json
Seen on: .NET

Meaning

global.json pinning an old SDK, CI images with old SDKs, or Visual Studio versions bundling older SDKs cause this.

Common causes

  • SDK not installed for the target framework
  • global.json pins an older SDK
  • CI image/setup-dotnet using an old version
  • Old Visual Studio/MSBuild

⚡ Quick fix

  1. Install the matching SDK
  2. Update or remove global.json’s version
  3. Set the SDK version in CI (actions/setup-dotnet)

Detailed fix by platform

Shell

  1. csharp
    dotnet --list-sdks
    cat global.json

YAML

  1. csharp
    - uses: actions/setup-dotnet@v4
      with: { dotnet-version: '8.0.x' }

How to diagnose

  1. SDKs — dotnet --list-sdks
  2. Pin — global.json
  3. CI — Configured version

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

COPY failed — COPY failed: file not found in build context / "/app/x": not found (Docker)COPY failedDefaultAzureCredential failed — DefaultAzureCredential failed to retrieve a token from the included credentials / ManagedIdentityCredential authentication unavailable (Azure)DefaultAzureCredentia…did not complete successfully — failed to solve: process "/bin/sh -c ..." did not complete successfully: exit code: 1 (Docker)did not complete succ…ELIFECYCLE — npm ERR! code ELIFECYCLE / Command failed with exit code 1 (npm)ELIFECYCLEERR_OSSL_EVP_UNSUPPORTED — Error: error:0308010C:digital envelope routines::unsupported (Node.js)ERR_OSSL_EVP_UNSUPPOR…Failed building wheel — error: subprocess-exited-with-error / Failed building wheel for x (Python)Failed building wheelFailed to find target with hash string — Failed to find target with hash string 'android-34' / Failed to install the following Android SDK packages as some licences have not been accepted (Android)Failed to find target…failed to read dockerfile — failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory (Docker)failed to read docker…NETSDK1045

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.