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.