Knowing which versions of .NET(Dot Net) are installed on your system is essential for developers and system administrators alike. Whether you're debugging compatibility issues, deploying applications, or ensuring your environment meets project requirements, identifying the installed .NET runtimes and SDKs can save you time and frustration.
In this article, we’ll cover how to check the installed .NET versions across different operating systems: Windows, Linux, and macOS.
How to Find the Installed .NET Versions on Your System
Getting Started
The Microsoft Dot Net Framework(Microsoft .NET Framework) commonly knows as MS .NET Frameworkis a software development platform developed by Microsoft. It provides a controlled environment for developing and running applications, primarily on Windows.
The software or application developed targeting the Microsoft .NET Framework must have the appropriate framework installed on the system; otherwise, the application will not run and will throw a runtime exception.
Hence every developer should know how to check which .NET Framework is installed on the system before deploying or installing their application in client machine.
This article teaches you how to check which versions of the .NET runtime and SDK are installed on your computer. If you have an integrated development environment, such as Visual Studio, .NET may have already been installed.
Using the .NET CLI (Cross-Platform)
The easiest and most consistent way to check installed .NET SDKs and runtimes is by using the .NET CLI (dotnet), which works on Windows, macOS, and Linux.
Step 1: Open Your Command Line
- On Windows, use Command Prompt or PowerShell.
- On macOS or Linux, use the Terminal.
Step 2: Run the Following Commands
To list all installed SDKs:
dotnet --list-sdks
You get output similar to the following.
3.1.424 [C:\program files\dotnet\sdk]
5.0.100 [C:\program files\dotnet\sdk]
6.0.402 [C:\program files\dotnet\sdk]
7.0.404 [C:\program files\dotnet\sdk]
8.0.100 [C:\program files\dotnet\sdk]
9.0.100 [C:\Program Files\dotnet\sdk]
To list all installed runtimes:
dotnet --list-runtimes
You get output similar to the following.
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Using the Registry Editor (On Winodows)
- Open the Registry Editor:
- Press
Windows + R
, typeregedit
, and press Enter.
- Press
- Navigate to the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full
- Look for a value called
Release
in the right pane.- This is a DWORD value.
- It tells you the installed version using a build number.
- Match the
Release
value to the .NET Framework version:
Release Value to Version Mapping (Common Versions)
Release Value | .NET Framework Version |
---|---|
533325 | 4.8.1 |
528040 | 4.8 |
461814 | 4.7.2 |
461808 | 4.7.2 (Windows 10 April 2018) |
461308 | 4.7.1 |
460798 | 4.7 |
394802 | 4.6.2 |
393295 | 4.6.1 |
393273 | 4.6.1 (Win 10 Nov 2015) |
379893 | 4.5.2 |
Using the Command Prompt (On Winodows)
Another easier way to get the exact version .NET version installed on your machine from a cmd prompt. Just follow the following instructions;
- Open the command prompt (i.e Windows + R → type "cmd").
- Type the following command, all on one line:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP
This will list all the .NET versions similar like below.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\CDF HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4.0
- If you want to check the latest .NET 4 version.
- Type following instruction, on a single line:
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\full" /v version
You will get result similar like below.
version REG_SZ 4.8.09037
Using the Install Folder (On Winodows)
It's possible that .NET is installed but not added to the PATH
variable for your operating system or user profile. In this case, the commands from the previous sections may not work. As an alternative, you can check that the .NET install folders exist.
When you install .NET from an installer or script, it's installed to a standard folder. Much of the time the installer or script you're using to install .NET gives you an option to install to a different folder. If you choose to install to a different folder, adjust the start of the folder path.
- dotnet executable
C:\program files\dotnet\dotnet.exe - .NET SDK
C:\program files\dotnet\sdk\{version}\ - .NET Runtime
C:\program files\dotnet\shared\{runtime-type}\{version}\
Summary
You can see both the SDK versions and runtime versions with the command dotnet --info
. You'll also get other environmental related information, such as the operating system version and runtime identifier (RID). I hope you found this information helpful.
Thanks