2 Ways to Check .NET Framework Version Using Command Line

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.

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

2 Ways to Check .NET Framework Version Using Command Line 1

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?

If you liked this post, Share it on:
Itechtics staff is a team of technology experts led by Usman Khurshid. We verify everything we write so that our users can be sure to trust us in everything we write. You can reach out to us for further help and support.

6 comments

  • Steve Si
    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
    theapprenticeco

    excellent solution for a company that seems to profit on messing everything on every update.

  • Balwider Singh
    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.

  • Anane Desire
    Anane Desire

    Thanks for the sharing

  • Koranteng Edward
    Koranteng Edward

    Tanks you for making me to know the use of .Net Framework using cmd line.
    I really enjoy every bit of it..

Get Updates in Your Inbox

Sign up for the regular updates and be the first to know about the latest tech information

Talk to us now

Talk to us straight and get your questions answered right away

Tell Us About Your Project