Issue:
How to perform a clean removal and reinstallation Microsoft .NET Runtime, ASP.NET Core Runtime, and .NET Desktop Runtime for any of the following reasons:
-
-
- The components are corrupted/damaged,
- The latest updates of the components are missing or are not installed properly.
- There are different versions of .NET Runtime version and ASP.NET Core Runtime installed on the machine.
-
Solution:
Uninstall ASP.NET Core Runtimes, and .NET Core Runtimes on the machine
-
- Use the Control panel:
Open the windows control panel, then find and uninstall all present versions of the following 3 software:-
-
- Microsoft .NET Runtime - <version> (x64)
- Microsoft Windows Desktop Runtime - <version> (x64)
- Microsoft ASP.NET Core <version> - Shared Framework (x64)
-
-
- Use the Microsoft .NET Uninstall Tool:
Note: This tool can only remove .NET SDKs and runtimes that were installed using a .NET SDK or .NET Runtime installer, or by a Visual Studio Installer (applies only for Visual Studio 2019 16.3 and earlier).-
- Download the .NET Uninstall Tool:
-
- Go to Releases · dotnet/cli-lab (github.com)
- Scroll down to the ‘Assets’ column and download the msi (for Windows OS).
- Follow the instructions and install the Microsoft .NET Core SDK Uninstall Tool.
-
- Open an elevated command prompt (Run as administrator)
- Type the following commands, then hit ‘enter’ on the keyboard to execute:
-
-
dotnet-core-uninstall list(*Optional – This will list all ASP.NET Core Runtimes, and .NET Core Runtimes installed on the machine)
-
dotnet-core-uninstall remove --all --runtime --yes(Run this command to remove all .NET Core Runtime on the machine)
-
dotnet-core-uninstall remove --all --aspnet-runtime --yes(Run this command to remove all ASP.NET Core Runtime on the machine)
-
-
- Download the .NET Uninstall Tool:
-
- Use the Control panel:
Download and install Microsoft .NET Runtimes
-
- Go to https://dotnet.microsoft.com/en-us/download/dotnet/
- Select the latest active version or the specific version recommended for your software to get to the download page,
- Download the 3 Runtime apps to your local drive (see example for .NET 8.0 for Windows (x64) below):
-
- ASP.NET Core Runtime 8.0.14
- .NET Desktop Runtime 8.0.14
- .NET Runtime 8.0.14
-
- Double-click on the installers to Install the apps.