guidox / Software

Install the Right .NET Runtime for an App That Will Not Start

TL;DR

Read the app's target with **dotnet --list-runtimes** and the Framework version under the NDP registry key, then install the matching runtime, not the SDK.

Before you start

Requirements

  • Windows 11
  • The app that fails
  • 15 minutes
Step by step

Instructions

01

Read the installed runtimes

**dotnet --list-runtimes** lists the modern runtimes; the registry key lists the .NET Framework 4.x version. An app needs one of the two, not both.

dotnet --list-runtimes
dotnet --list-sdks
Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' -ErrorAction SilentlyContinue | Select-Object Version,Release
02

Identify what the app needs

The runtimeconfig.json names the framework and the version for a modern app, and the manifest names the Framework version for a 4.x app. That file is the answer, not the error text.

Get-ChildItem 'C:\Program Files\App' -Filter *.runtimeconfig.json -Recurse -ErrorAction SilentlyContinue | Select-Object FullName
Get-Content 'C:\Program Files\App\App.runtimeconfig.json' -ErrorAction SilentlyContinue
Get-Content 'C:\Program Files\App\App.exe.config' -ErrorAction SilentlyContinue | Select-String -Pattern 'supportedRuntime|targetFramework'
03

Read the actual error

**Event Viewer** records the .NET runtime error with the exception and the assembly name. A missing assembly is a different problem from a missing runtime.

Get-WinEvent -LogName Application -MaxEvents 100 | Where-Object ProviderName -match '\.NET Runtime|Application Error' | Select-Object TimeCreated,Id,Message -First 3
Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Store' -ErrorAction SilentlyContinue | Select-Object * -ExcludeProperty PS*
04

Install the runtime, not the SDK

An end user needs the runtime. The SDK adds compilers and is the wrong download for a machine that only runs the app.

winget search Microsoft.DotNet.Runtime
winget install --id Microsoft.DotNet.Runtime.8 --silent --accept-package-agreements --accept-source-agreements
dotnet --list-runtimes
05

Enable the right Framework feature on older builds

**.NET Framework 3.5** is an optional Windows feature, not a download. An app that targets 2.0 or 3.5 needs that feature enabled.

Get-WindowsOptionalFeature -Online -FeatureName NetFx3 | Select-Object FeatureName,State
Enable-WindowsOptionalFeature -Online -FeatureName NetFx3 -All -NoRestart
Get-WindowsOptionalFeature -Online -FeatureName NetFx3 | Select-Object State
06

Verify the app starts

Start it from its own folder, not from a shortcut, so the working directory matches. A missing DLL next to the exe is a deployment problem, not a runtime one.

Push-Location 'C:\Program Files\App'
.\App.exe
Pop-Location
Get-Process App -ErrorAction SilentlyContinue | Select-Object Name,Id,StartTime
Get-WinEvent -LogName Application -MaxEvents 10 | Where-Object ProviderName -match '.NET' | Select-Object TimeCreated,Message -First 2
Troubleshooting

Common issues

The runtime is installed but the error persists

The app targets a major version that is missing, for example 6 when only 8 is installed. Major versions are not interchangeable by default.

winget cannot find the package

The package id differs by version. Search first, then install with the exact id it returns.

A missing DLL is named in the error

That is a deployment issue. Reinstall the app, or install the VC++ redistributable it depends on.

The app works for another user

The runtime may be installed per user. Install it machine-wide, or check the DOTNET_ROOT variable for that profile.

FAQ

Frequently asked

Can different .NET versions coexist?

Yes. Modern .NET installs side by side per major version; Framework 4.x is a single in-place component.

Do I need a reboot?

For NetFx3 usually yes. For a modern runtime, a new shell is often enough.

Is the SDK harmful on a normal PC?

It is not harmful, only unnecessary. It adds size and tools that an end user will never open.

How to undo this

Remove a modern runtime with winget uninstall --id Microsoft.DotNet.Runtime.8, or disable NetFx3 with Disable-WindowsOptionalFeature -Online -FeatureName NetFx3.

Changelog · 1 entry
  1. 2026-11-01
    First version
Interactive version: checklist, feedback, related guides →

Free · no account needed · tracks your progress