Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4791 pages

Node.js, PHP and APIs · Troubleshooting walkthrough

A .NET tool or app refuses to start and asks you to install or update .NET

Short answer

You must install or update .NET to run this application appears when the host cannot find the runtime an app needs. Usually the tool targets an older major release, .NET sits outside the host's search path, or the runtime has the wrong CPU type. Compare its Framework and Architecture lines with dotnet --list-runtimes. Applies to .NET 10 and 11.

  • Applies to .NET SDK 11.0.100 and 10.0.404, .NET 11.0.0 and 10.0.15 runtimes, macOS, Linux and Windows
  • Updated
  • By Maaz Zindani, Senior Software Engineer

The message comes from the .NET host, the small launcher that starts every .NET app and global tool before any of its own code runs. The host reads which runtime the app was built for, looks for a matching one, and stops with this text if it finds none. Having the SDK installed does not settle it, because the question is about the runtime the app asked for.

Three things go wrong in practice: the tool targets an older major version than the ones you have, the host looks in a folder where .NET is not, or the runtime installed is for the other CPU type. The error text itself says which, so read it first.

The text you see

  • You must install or update .NET to run this application.
  • Framework: 'Microsoft.NETCore.App', version '8.0.0' (x64)
  • The following frameworks were found:
  • You must install .NET to run this application.
  • .NET location: Not found

Stage 1

Read the three clues in the error

The host prints a Framework line with a version (for example Microsoft.NETCore.App 8.0.0), an architecture in brackets, and a list of what it did find or a .NET location line. Put that beside what this shell can see.

What runtimes, which folder, which CPU

dotnet --list-runtimes
echo "DOTNET_ROOT=$DOTNET_ROOT"
uname -m
  • Framework asks for an older major version than any runtime listed: the first cause.
  • .NET location: Not found, or a folder different from the one you installed to: the second cause.
  • Architecture says x64 while uname -m prints arm64, or the reverse: the third cause.

Stage 2

The tool targets an older major version

Microsoft's tool troubleshooting page explains that roll-forward does not cross a major version by default. A tool built for .NET 8 will not use a .NET 10 or 11 runtime on its own, so a machine that keeps only the newest runtime shows this error even though .NET looks up to date.

You have two ways out. Install the older runtime named in the error, or reinstall the tool with the switch that lets it run on a newer major version. That switch, --allow-roll-forward, is available from the .NET 9 SDK. Also look for a newer release of the tool, because its author may already target a current version.

Reinstall a global tool with roll-forward

dotnet tool uninstall -g <package-id>
dotnet tool install -g <package-id> --allow-roll-forward

Roll-forward can expose a tool to behaviour changes it was never tested against. If the tool misbehaves afterwards, install the runtime it asked for instead.

Stage 3

The host searches a folder where .NET is not

Started through its own executable, an app looks in DOTNET_ROOT if that variable is set, then in the globally registered location (on Linux, /etc/dotnet/install_location), then in the default folder such as /usr/local/share/dotnet. A script install in your home folder is outside that search unless DOTNET_ROOT points at it.

The opposite mistake is also common: a DOTNET_ROOT left over from an install you removed sends the host to an empty folder.

Point the host at the install folder

# ~/.zshrc or ~/.bashrc, for a script install in ~/.dotnet
export DOTNET_ROOT=$HOME/.dotnet
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools

Check with ls "$DOTNET_ROOT/shared/Microsoft.NETCore.App" in a new terminal. If the variable is stale, delete it rather than fixing it.

Stage 4

The runtime is for the other CPU type

An Arm64 runtime cannot run an x64 app, and the reverse. On an Arm-based Mac, Arm64 builds go to /usr/local/share/dotnet and x64 builds to a separate x64/dotnet folder under it, so having one does not satisfy the other.

Install the .NET Runtime from the download page for the version in the error, choosing the architecture on the Architecture line. If you keep both, make sure PATH and DOTNET_ROOT point to the one the tool needs.

Is an x64 runtime present on this Mac

ls /usr/local/share/dotnet/x64/dotnet/shared/Microsoft.NETCore.App 2>/dev/null || echo "no x64 runtime"

Stage 5

List tools and runtimes, then start the tool

  1. Run dotnet tool list -g and then the tool's command: it should start, not print the runtime message.
  2. Run dotnet --list-runtimes again and check the major version and architecture match the Framework line.
  3. Pin tool versions in a local tool manifest (dotnet new tool-manifest) so a whole team runs the same release.

If the right version and architecture are listed and the app still will not start, the next message is usually a missing native library or an exception in the app itself, which is a different fix.

If you only keep one thing

  • The host needs the runtime the app asked for, not just an SDK.
  • Roll-forward does not cross a major version unless you allow it.
  • DOTNET_ROOT must name the real install folder, or be unset.
  • Architecture must match: Arm64 and x64 runtimes are separate.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Next step

Want a second pair of eyes on it?

Send me the error and what changed before it started. I reply within 24 hours.