Is there an easy way to check the .NET framework version?

Answered

Easy meaning not having to go via regedit.

JADEN KORR Asked on 14th May 2019 in windows 10.
Add Comment
1 Answer(s)
Best answer

 

Yes, you can check using powershell to read regedit, and you can build-up a script to give you the version that is installed.

Check for a minimum-required .NET Framework version (4.5 and later) with PowerShell

  • Use PowerShell commands to check the value of the Release entry of the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full subkey.

The following examples check the value of the Release entry to determine whether the .NET Framework 4.6.2 or later is installed. This code returns True if it’s installed and False otherwise.


# PowerShell 5

Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\' | Get-ItemPropertyValue -Name Release | Foreach-Object { $_ -ge 394802 }

 


# PowerShell 4

(Get-ItemProperty "HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full").Release -ge 394802

To check for a different minimum-required .NET Framework version, replace 394802in these examples with a Release value from the .NET Framework version table.

Source: https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed

Or you can use this scripts also: https://www.syspanda.com/index.php/2018/09/25/check-installed-net-versions-using-powershell/

Hope this can help you!

Regards,

João Dias

LUKE SKYWALKER Answered on 14th May 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.