Software⏱️ 3 min read📅 2026-06-11

How to Fix: "You must install .NET Desktop Runtime 6.0.4 (x64)" error

Error message when running a WPF application targeting .NET 6.0 on Windows 10 machines.

Quick Answer: Ensure the correct .NET Desktop Runtime version is installed, as indicated by the error message.

The error message 'You must install .NET Desktop Runtime 6.0.4 (x64)' is displayed when attempting to run a WPF application targeting .NET 6.0 on Windows 10 machines. This issue affects users who have created applications using Visual Studio 2022 and are trying to deploy them without installing the required runtime.

This error can be frustrating as it may lead to confusion about whether the application is not compatible with the system or if there's an issue with the development environment.

⚠️ Common Causes

  • The primary reason for this error is that .NET Desktop Runtime 6.0.4 (x64) is required for WPF applications targeting .NET 6.0 to run on Windows 10 machines. This runtime provides the necessary components and libraries required by the application.
  • An alternative reason could be that there are issues with the installation or configuration of the .NET Desktop Runtime on the system, which may prevent it from being detected correctly.

🔧 Proven Troubleshooting Steps

Installing the .NET Desktop Runtime

  1. Step 1: Download the .NET Desktop Runtime 6.0.4 (x64) from the official Microsoft download page: https://dotnet.microsoft.com/en-us/download/dotnet/6.0
  2. Step 2: Run the installer and follow the prompts to install the runtime on the system.
  3. Step 3: After installation, verify that the runtime has been successfully installed by checking the version in the .NET runtimes installed section of the dotnet --info command.

Configuring the Visual Studio Environment

  1. Step 1: Open Visual Studio and go to Tools > Options > NuGet Package Manager > Package Sources.
  2. Step 2: Add a new package source with the path to the .NET Desktop Runtime 6.0.4 (x64) installation directory.
  3. Step 3: Restart Visual Studio or rebuild the solution to ensure that the runtime is detected correctly.

🎯 Final Words

To resolve this issue, it's recommended to install the .NET Desktop Runtime 6.0.4 (x64) and configure the Visual Studio environment to detect it correctly. If installing the runtime doesn't work, try configuring the Visual Studio environment to use the correct package source.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions