.Net: How do I find the .NET version?

There is an easier way to get the exact version .NET version installed on your machine from a cmd prompt. Just follow the following instructions;

  1. Open the command prompt (i.e Windows + R → type "cmd").
  2. Type the following command, all on one line:

reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP"

(This will list all the .NET versions.)

  1. If you want to check the latest .NET 4 version.
  2. Type following instruction, on a single line:

reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\full" /v version

Please find the attached image below to see how it is shown.

Enter image description here


Just type any one of the below commands to give you the latest version in the first line.

1. CSC
2. GACUTIL /l ?
3. CLRVER

You can only run these from the Visual Studio Command prompt if you have Visual Studio installed, or else if you have the .NET framework SDK, then the SDK Command prompt.

4. wmic product get description | findstr /C:".NET Framework"
5. dir /b /ad /o-n %systemroot%\Microsoft.NET\Framework\v?.*

The last command (5) will list out all the versions (except 4.5) of .NET installed, latest first.
You need to run the 4th command to see if .NET 4.5 is installed.

Another three options from the PowerShell command prompt is given below.

6.   [environment]::Version
7.   $PSVersionTable.CLRVersion
8.   gci 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -recurse | gp -name Version,Release -EA 0 |
     where { $_.PSChildName -match '^(?!S)\p{L}'} | select PSChildName, Version, Release

The last command (8) will give you all versions, including .NET 4.5.


.NET Version Detector is a GUI utility that displays which of the six(!) versions of the framework are installed.

Tags:

.Net