How do I find out which version of .NET is installed?
I\'m looking for something as simple as \"java -version\" that I can type at the command prompt and that tells
My god, so much mess to find version of installed .net framework?
Windows > Search > Visual Studio Installer > for installed version of VS, tap on More > Modify > Individual Components and see it there:
If you do this fairly frequently (as I tend to do) you can create a shortcut on your desktop as follows:
powershell.exe -noexit -command "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"
(this is from Binoj Antony's post).(NOTE: I am not sure if this works for 4.5, but I can confirm that it does work for 4.6, and versions prior to 4.5.)
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;
Open the command prompt (i.e Windows + R → type “cmd”) and type the following command, all on one line: %windir%\Microsoft.NET\FrameWork, and then navigating to the directory with the latest version number.
Refer to http://dotnettec.com/check-dot-net-framework-version/
To just get the installed version(s) at the command line, I recommend using net-version.
Source code is available on github.com
Full disclosure: I created this tool myself out of frustration.
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.
Just type the following in the command line:
dir /b /ad /o-n %systemroot%\Microsoft.NET\Framework\v?.*
Your dotnet version will be shown as the highest number.