ThisCalculator

Everyday

Check .NET Framework Version via Command Line

Updated · Standard formula, shown below

Check .NET Framework Version via Command Line

To check the .NET Framework version from the command line, open a Command Prompt or PowerShell window and run reg query "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP" /s. This lists all installed .NET Framework versions in the registry, showing the version number and service pack level for each.

Why the Registry Is the Source of Truth

Unlike many programs, .NET Framework doesn’t have a single executable you can check. The registry is the canonical store because the installer writes version information there during setup. The NDP key contains subkeys for each major version (v2.0, v3.0, v3.5, v4). For .NET 4.x, the Full subkey holds the exact version. The Release DWORD is a numeric code that Microsoft updates with each servicing release; you can map it to a human-readable version using a lookup table from Microsoft’s documentation.

Alternative Command-Line Methods

Besides the registry query, you have other options:

  • PowerShell: Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -Recurse | Get-ItemProperty | Select-Object PSChildName, Version, Release – formats the output nicely.
  • Using .NET itself: [System.Environment]::Version in PowerShell returns the CLR version, but this shows the runtime of the PowerShell process, not the installed framework. It’s often misleading.
  • Using the clrver tool: If you have the .NET SDK installed, clrver lists CLR versions, but it’s not standard on all systems.

For most users, the registry query is the most reliable and works everywhere without extra tools.

How to Read the Output

The command output is verbose. Look for the v4\Full subkey – that’s the .NET Framework 4.x line. The Version value (e.g., 4.8.04084) is the exact build. The Release DWORD is a number like 528040; Microsoft provides a table that maps this to a version like “4.8�. For older versions, you’ll see subkeys like v3.5 with a Version value. If you see v4\Client but no Full, only the Client Profile is installed (rare on modern systems).

Common Problems and Misconceptions

  • Mistaking CLR version for framework version: The CLR (Common Language Runtime) version (e.g., 4.0.30319) is not the same as the .NET Framework version. Many forums incorrectly tell you to use [Environment]::Version – that shows the CLR, not the framework.
  • Missing registry key: If the NDP key doesn’t exist, .NET Framework may not be installed, or you’re on a system where it’s not registered (rare). On 64-bit systems, also check HKLM\SOFTWARE\WOW6432Node\Microsoft\NET Framework Setup\NDP for 32-bit installs.
  • Permission errors: The registry query usually works without admin rights, but if you get “access denied,� run the command prompt as Administrator.
  • Confusing .NET Core/.NET 5+ with .NET Framework: The registry method only shows the classic .NET Framework. For .NET Core or .NET 5/6/7/8, use dotnet --list-runtimes or dotnet --list-sdks. These are different products.

Frequently Asked Questions

How do I check if .NET Framework 4.8 is installed?

Run the registry query and look for v4\Full. If the Release value is 528040 or higher, .NET Framework 4.8 is installed. The Version string will start with 4.8.

Can I check the .NET Framework version without admin rights?

Yes, the registry query typically works without elevation because the HKLM\SOFTWARE keys are readable by all users. If you encounter an access denied error, you may need to run the command as an administrator.

Why does PowerShell show a different version than the registry?

PowerShell’s [Environment]::Version shows the CLR version of the PowerShell process itself, which is not the same as the installed .NET Framework. The registry query is the correct method for the framework.

Does the command work on Windows 11?

Yes, the registry structure is the same on Windows 11. You can use the same command to check the .NET Framework version.

What if I have .NET Core or .NET 5+ installed?

Those are separate runtimes. Use dotnet --list-runtimes in a command prompt to see them. The registry method only applies to the classic .NET Framework.

Is there a way to get just the version number without all the extra output?

Yes, in PowerShell you can run: (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full').Release to get just the Release number. Then map it using Microsoft’s table.

When to Use This Method vs. GUI Tools

Use the command line when you need to check multiple machines quickly, when you’re writing a script, or when you don’t have access to the GUI (e.g., Server Core). For a one-off check on a desktop, you can also open the “.NET Framework� entry in Control Panel, but that only shows the major version (like 4.8), not the exact build. The command line gives you the precise build number, which is essential for troubleshooting specific bugs fixed in later updates.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.