On Windows, multiple versions of the .NET Framework can be installed and used simultaneously. When you install a new application developed on .Net on a computer / server, it is sometimes necessary to know in advance which versions and service packs of the .Net Framework are already installed. There are several ways to get a list of installed versions of the .NET Framework.
List all the .NET Framework installed versions from the command line
All versions of the .NET Framework are installed into the folders:
- %SystemRoot%\Microsoft.NET\Framework
- %SystemRoot%\Microsoft.NET\Framework64
Therefore, the easiest way to display the list of .Net installed versions is to open this folder. Each version corresponds to a separate directory with the v characters at the beginning and the version number as the folder name. Alternatively, you can list the .NET Framework directories (versions) from the command prompt like this:
dir %WINDIR%\Microsoft.Net\Framework\v* /O:-N /B
This command will list all installed versions except 4.5, since the .NET Framework 4.5 is installed in the v4.0.xxxxx subdirectory.
How to check your .NET Framework version using registry?
When you install or update any version of the .NET Framework, quite a lot of useful information is written to the system registry.
Run the registry editor (regedit.exe) and go to registry key HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP. This key contains a subkey for each version of .NET installed on the computer. The necessary information is contained in the key with the version number as key name (and for .Net 4.0 and higher in the subkeys Client and Full). We are interested in the following registry parameters:
- Install — version installation flag (if equal to 1 – this version of .Net is installed on the computer);
- Install Path — the directory where this .Net version is installed;
- Release — .Net current release number;
- Version — full version number of .Net Framework.
In this example, you can see that the .NET Framework v2.0.50727, 3.0, 3.5 and 4.0 (release 461808) are installed on the computer.
Using the following table, you can establish a correspondence between the release number and the version of the .NET Framework 4.5.
Release Value | .NET Framework version |
378389 | .NET Framework 4.5 |
378675 | NET Framework 4.5.1 on Windows 8.1 / Windows Server 2012 R2 |
378758 | .NET Framework 4.5.1 on Windows 8, Windows 7 SP1, Windows Vista SP2 |
379893 | .NET Framework 4.5.2 |
393273 | .NET Framework 4.6 on Windows 10 |
393297 | .NET Framework 4.6 |
394254 | .NET Framework 4.6.1 on Windows 10 November Update |
394271 | .NET Framework 4.6.1 |
394802 | .NET Framework 4.6.2 on Windows 10 Anniversary Update |
394806 | .NET Framework 4.6.2 |
460798 | .NET Framework 4.7 on Windows 10 Creators Update |
460805 | .NET Framework 4.7 |
461308 | .NET Framework 4.7.1 on Windows 10 Fall Creators Update |
461310 | .NET Framework 4.7.1 |
461808 | .NET Framework 4.7.2 on Windows 10 April 2018 Update |
461814 | .NET Framework 4.7.2 |
Checking the .Net Framework version using PowerShell
You can get information about installed versions and releases of the Framework using PowerShell. This information can also be obtained from the registry. For example, to display information about the currently installed .NET 4.x release, use the Get-ItemProperty cmdlet (for more information about managing registry keys from PowerShell read the article):
(Get-ItemProperty ‘HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full’ -Name Release).Release
.Net Version Detector utility
There is a third-party freeware utility Asoft .Net Version Detector, which can help you to get a list of installed versions of the .NET Framework in a descriptive and convenient way. You can download this tool from the developer’s website (http://www.asoft.be/prod_netver.html). This tool is portable and doesn’t require installation. In a beautiful window, the utility will display all the .NET versions installed on the computer, as well as the maximum available version at this moment.
It’s quite convenient that you can go to the Microsoft download page for different versions of the .NET Framework right in the program, where you can download the last .NET package for your Windows build.
CLRver.exe tool
Microsoft Visual Studio includes a separate utility – CLRver.exe, which generates a report of all installed versions of the CLR on the computer. Run the CLRver.exe
from the command line and the list of installed dotNet versions on the computer will appear in the cmd console.
Finally, it’s important to mention that in server operating systems starting from Windows Server 2012, all basic versions of .Net (3.5 and 4.5) are part of the system and are installed as a separate feature (Installing .NET Framework 3.5 in Windows Server 2016/ 2012 R2), and minor ones (4.5.1, 4.5.2, etc.) are installed as separate updates via Windows Update or WSUS.
1 comment
You are missing a colon in your posh command for the registry provider.
dir ′HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full′