With the release of each new version of .NET Framework, users are bound to install as many framework versions as possible as some applications require .NET Framework version 3.5 and some will work only on version 2.0. Microsoft does not give an easy way to check which versions of .NET Framework are installed on a Windows system.
Nope, you can’t check it from Apps and Features or Programs and Features!
We have already share a software called .NET Framework detector which can list down the frameworks installed and supported by your system. Although it is an easier way to check but sometimes it becomes difficult to install the software on every system if you are a developer or a network admin.
Table of Contents
Windows 10 Version 1803 has .NET Framework 4.7.2 installed by default. There are a few ways we can check which versions of .NET Framework are installed using command line. Let’s go through them one by one.
How to check .NET Framework Version Using Command Line
1- Using Windows directory
Here we are going to check which .Net Framework is installed on your computer through command line.
Simply open command Prompt from the start and then type any of the following commands
dir %windir%\Microsoft.NET\Framework /AD
It will show the list of all the directories with all the versions installed along with the latest ones.
Once you are in the directory then to check which latest version is installed type
.\MSBuild.exe -version
For example, if I want to check the exact version for .NET Framework 4, I will run the following commands in sequence:
dir %windir%\Microsoft.NET\Framework /AD cd %windir%\Microsoft.NET\Framework\v4.0.30319 .\MSBuild.exe -version
2- Using WMIC
You can list down the default (latest one) .NET Framework being used by the system using the WMIC command:
wmic product get description | findstr /C:.NET
If you want a list of all versions installed on your computer, you can also use the following command:
dir /b %windir%\Microsoft.NET\Framework\v*
This command is basically a rip-off of the first method we used above. This will not give you the exact version number as you still have to use the MSBuild command as listed above to get the exact version number.
Which method do you use for checking the installed .NET Framework version?
6 comments
Steve Si
Here is a cmd script which works on English Windows OS (other languages not tested).
@echo off
set “mycmd=powershell -ExecutionPolicy Bypass echo $psversiontable ^| find /i “CLRVersion””
for /f “tokens=2,3,4 delims=. ” %%a in (‘%mycmd%’) do set dotnetver=%%a.%%b.%%c
set “mycmd=%windir%Microsoft.NETFrameworkv%dotnetver%MSBuild.exe -version ^| find /i “Build””
for /f “tokens=6,7 delims= ” %%a in (‘%mycmd%’) do set dotnetver=%%a
echo %dotnetver%
theapprenticeco
excellent solution for a company that seems to profit on messing everything on every update.
Balwider Singh
The simplest possible way is to open Powershell and type:
$psversiontable
You will get “CLRVersion” entry which is your installed .net Framework version.
Derrick Reisdorf
CLRVersion is not your .NET version. Anything .NET 4 and above (4, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2. 4.8) will show CLRVersion 4.0. Any .NET below that will show CLRVersion 2. (.NET 1.1 = CLRVersion 1.1; .NET 1.0 = CLRVersion 1.0)
https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies
Here’s how MS recommends you find your .NET version:
https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed
Anane Desire
Thanks for the sharing
Koranteng Edward
Tanks you for making me to know the use of .Net Framework using cmd line.
I really enjoy every bit of it..