About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
When a framework-dependent .NET application stops with "You must install or update .NET to run this application", its host could not find a runtime that fits what the application asked for. The message itself names the application, the architecture, the framework and version required, the ".NET location" where the host looked, and the frameworks it did find. Compare those lines with what is installed, then install the matching runtime. A message that says ".NET location: Not found" and "You must install .NET to run this application" means no installation was found at all.
What the message means
Microsoft's page on app launch failures covers framework-dependent applications, which rely on a .NET installation on the machine. It gives two messages. The first, "You must install .NET to run this application.", comes with .NET location: Not found. The second is the one in the title above. Its example reads:
You must install or update .NET to run this application.
App: C:\repos\myapp\myapp.exe
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '5.0.15' (x64)
.NET location: C:\Program Files\dotnet\
The following frameworks were found:
6.0.2 at [c:\Program Files\dotnet\shared\Microsoft.NETCore.App]
By default, Microsoft's version-selection page says, an application requires a framework with the same major version it targets, but can use a higher minor or patch version. In its example, an application that targets 5.0 runs on 5.0.3 or on 5.1.0, but it does not run when the highest runtime installed is 3.1.1. Developers may set a different behaviour, and the host can be told to roll forward further. In the launch-failure example above, 6.0.2 is installed but the application needs 5.0.15, and the host reports the error.
Microsoft lists three runtime downloads and their frameworks. The ASP.NET Core Runtime holds Microsoft.NETCore.App and Microsoft.AspNetCore.App. The .NET Desktop Runtime holds Microsoft.NETCore.App and Microsoft.WindowsDesktop.App. The .NET Runtime holds Microsoft.NETCore.App. The Framework: line tells you which one you need.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| The required major version is not installed | The Framework: version is a major that dotnet --list-runtimes does not list |
Compare the line with the list |
| Only a newer major version is installed | The "frameworks were found" list shows a higher major | Roll-forward default does not cross majors |
| Wrong architecture | Architecture: x86 or x64 differs from the installed runtime |
Architecture on the message against the install folder |
DOTNET_ROOT points elsewhere |
The message shows a .NET location that is not the normal install |
Print the variable |
| .NET is installed in a non-default place | .NET location points to a path that lacks the runtime |
Registry install location and the folder contents |
| The wrong runtime package | The framework is Microsoft.AspNetCore.App or Microsoft.WindowsDesktop.App but only the base runtime is installed |
Table of included frameworks |
Prove the cause before changing anything
All steps read only.
1. Copy the whole message. Write down App, Architecture, the Framework name and version, the .NET location, and each line under "The following frameworks were found".
2. List the installed runtimes. Microsoft's page shows this command and says it lists the runtime versions installed.
dotnet --list-runtimes
Each line gives a framework name, a version and its folder. Match the framework name and major version from step 1. Our own advice: run it as the same account as the failing application, because a service account can see different variables from your own session.
3. Check DOTNET_ROOT. Microsoft says that if it is set, .NET skips the default install location entirely. Its page prints the value like this in PowerShell:
echo $env:DOTNET_ROOT
Also check the architecture-specific variants it names, such as DOTNET_ROOT_X86, DOTNET_ROOT_X64 and DOTNET_ROOT(x86).
4. Check the search order. Microsoft says that when an application runs through its executable (apphost) on Windows, the host searches, in order: subdirectories relative to DOTNET_ROOT if set, the globally registered location in HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\<arch>\InstallLocation, then the default %ProgramFiles%\dotnet (or %ProgramFiles(x86)%\dotnet for 32-bit processes on 64-bit Windows). It uses the first location where an installation is found.
5. Read the application's roll-forward setting. Open the *.runtimeconfig.json file next to the executable. It names the framework and version, and may contain rollForward. Microsoft says the file is produced at compile time and that users can edit it.
Fix
Choose by what the checks showed.
Install the matching runtime
Microsoft's instruction is to install a compatible runtime at the .NET location the message gives: pick the runtime download that contains the missing framework, matching the architecture on the message, and run its installer. For Linux, it names packages such as dotnet-runtime-10.0 and aspnetcore-runtime-10.0.
First save the current state:
dotnet --list-runtimes > runtimes-before.txt
Risk: the installer adds a runtime to the whole machine, so every application on it can then see that version. Microsoft says runtime updates are compatible within a major version band such as 8.x and 7.x, and our own reading is that a runtime in a major already used on the machine is the lower-risk choice. Our own reading: a newly installed major version can also change which runtime an application with roll-forward enabled picks.
Install the runtime from the .NET downloads page for the version and architecture on the message. The installer reports its own result.
Disruptive step, only if you back out: removing a runtime removes it for every application on the machine that uses it, so any application that needs that version stops starting. Microsoft's removal page says to uninstall .NET by mirroring the action you used to install it, and that an item showing it came from Visual Studio is removed with the Visual Studio Installer.
To undo it: remove only the runtime the installer added, the one that runtimes-before.txt does not list.
For a runtime installed with the Windows installer, Microsoft's removal page names the Apps & features (or Installed Apps) settings page: search for .net, select that one entry and choose Uninstall. Then run dotnet --list-runtimes again and compare it with runtimes-before.txt.
The variable or install location is wrong
Where DOTNET_ROOT points to an old or missing folder, Microsoft's page says to remove or update the variable if .NET has moved. Our own reading: where the variable is set (a machine setting, a service definition, a script or a pipeline) decides how it is changed, and no single command covers all of them. This page therefore describes the remedy and does not tell you to run a change; record the current value with the echo $env:DOTNET_ROOT check in step 3 before whoever owns that setting changes it.
Allow roll-forward to a newer version
Microsoft's roll-forward guidance applies when a higher version of the required framework is installed and you want the application to run on it. Microsoft warns that this can cause unintended behaviour because the application runs on a version it was not designed for. Its page lists four places to configure it. The *.runtimeconfig.json file is evaluated first, then the DOTNET_ROLL_FORWARD environment variable, then the --roll-forward command-line option, with later ones overriding earlier ones.
First save the current state:
copy C:\apps\orders\orders.runtimeconfig.json C:\apps\orders\orders.runtimeconfig.json.2026-12-03
Risk: the next edit lets the application run on a different major .NET version from the one it was built and tested for. Serialisation, security defaults and library behaviour can differ, and a failure can then appear in the application rather than at start-up.
Edit orders.runtimeconfig.json and add "rollForward": "Major", in the runtimeOptions block, following the layout of Microsoft's example. The block below is only that layout with our own values (Microsoft's example uses net5.0 and 5.0.0): keep your file's own tfm and framework version and add only the rollForward line. By Microsoft's table, Major rolls to the next higher major version, at its lowest available minor and highest patch, if the requested major is missing; if the requested major is present it uses the Minor policy.
{
"runtimeOptions": {
"tfm": "net8.0",
"rollForward": "Major",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0"
}
}
}
Risk, only if you back out: the command below overwrites orders.runtimeconfig.json with the saved copy, so any other edit made to that file since the save is lost. Our own reading: the host reads this file when the application starts, so run the copy while the application is not starting.
To undo it: copy the saved file back over orders.runtimeconfig.json, wait for the copy to finish, then start the application.
copy C:\apps\orders\orders.runtimeconfig.json.2026-12-03 C:\apps\orders\orders.runtimeconfig.json
Example (illustrative): on app01, C:\apps\orders\orders.exe stops with Framework: 'Microsoft.NETCore.App', version '8.0.0' (x64) and .NET location: C:\Program Files\dotnet\. The list of frameworks found shows only 9.0.10. DOTNET_ROOT is not set, and the file orders.runtimeconfig.json has no rollForward setting. The default Minor policy does not cross from 8 to 9, so the host refuses. The administrator saves the runtime list and installs the x64 .NET 8 runtime from the downloads page. The application starts and uses 8.0.x.
Confirm the fix
dotnet --list-runtimesnow lists the framework and major version the message named, in the architecture it named.- Start the application the way users do, as the same account; the message no longer appears.
- If you used roll-forward, test the application's main functions, not only its start-up.
What to watch afterwards
- Keep each application's required framework in its deployment notes, so that a server rebuild installs the right runtime first.
- Our own advice: prefer installing the exact major version over roll-forward for business applications, and treat roll-forward as a decision to test.
- For ASP.NET Core under IIS, see ASP.NET Core Will Not Start on IIS: Diagnose 500.30 and 500.31. For what Windows Update does and does not patch, see .NET on Windows Server: what Windows Update patches and what it leaves to you.
Read next
Related articles you may want next.
- TroubleshootingASP.NET Core Will Not Start on IIS: Diagnose 500.30 and 500.31Match the hosting-module error to runtime, deployment and startup evidence and select a scoped correction.Read article
- Hosting.NET on Windows Server: what Windows Update patches and what it leaves to youWhy a fully patched Windows server can still run an out-of-support .NET runtime: the difference between .NET Framework and modern .NET, how each is updated on Windows Server, what self-contained applications mean for patching, and why .NET 8 and 9 support ended on 10 November 2026.Read article
- Troubleshooting.NET Runtime Event ID 1026: "The process was terminated due to an unhandled exception" - read Exception Info, then capture a dump.NET Runtime Event 1026 says the process was terminated due to an unhandled exception. Read Exception Info, then collect a crash dump with WER LocalDumps.Read article
Risks and limits
- These commands have not been run or lab-tested.
- The error wording may differ on other host versions; the text quoted above is Microsoft's example.
- Removing a runtime can stop applications that rely on it.
- Roll-forward changes which runtime runs the application; Microsoft says to know the compatibility level before overriding the default.
Sources
- Troubleshoot app launch failures — Microsoft Learn, page dated 2 June 2026, accessed 3 December 2026
- Select the .NET version to use — Microsoft Learn, page dated 15 May 2026, accessed 3 December 2026
- .NET environment variables — Microsoft Learn, page dated 10 November 2026, accessed 3 December 2026
- How to check that .NET is already installed — Microsoft Learn, page dated 11 November 2026, accessed 3 December 2026
- How to remove the .NET Runtime and SDK — Microsoft Learn, page dated 25 September 2026, accessed 3 December 2026
This article was originally published on .