.NET Framework
version check
software development
troubleshooting
programming tips

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

Master System Design with Codemia

Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.

Introduction

Yes. On Windows, the easiest reliable way to check the installed .NET Framework version is usually the registry, especially for .NET Framework 4.5 and later. There are other shortcuts, but some of them only tell you that “some .NET is installed” rather than the exact framework release you care about.

First Distinguish .NET Framework From Modern .NET

This question is specifically about .NET Framework, which is the Windows-only framework line such as 4.6.2, 4.7.2, or 4.8.1. It is different from modern .NET such as .NET 6, .NET 7, or .NET 8.

That matters because:

  • 'dotnet --info is useful for modern .NET'
  • it does not tell you the full story for .NET Framework

If you need the installed .NET Framework release, the registry is the best source.

Check the Registry for .NET Framework 4.5+

For .NET Framework 4.5 and later, look at this registry key:

text
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full

The important value is Release.

In PowerShell:

powershell
1Get-ItemProperty `
2  'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' `
3  Get-ItemProperty -Name Version -ErrorAction SilentlyContinue |
4  Where-Object { $_.Version } |
5  Select-Object PSChildName, Version

This is useful when you need to know whether legacy versions such as 3.5 are installed alongside the newer v4 family.

Why Folder Inspection Is Not the Best Method

You will often see advice to look under:

text
C:\Windows\Microsoft.NET\Framework

That can tell you something about installed runtime folders, but it is not the most reliable way to identify the effective .NET Framework release. Folder names and actual installed servicing state are not the same thing.

Use the registry when accuracy matters.

What About an App’s Target Framework

Sometimes the real question is not “what is installed on the machine” but “what framework does this application target.”

That is different.

For a Visual Studio project, check the project properties or the project file. You may see something like:

xml
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>

That tells you what the app was built for, not necessarily what is installed on the machine where it runs.

Use clrver Only in Specific Cases

Older developer tools sometimes include utilities such as clrver, which can show loaded CLR versions for running processes. That can be helpful during diagnostics, but it is not the simplest or most general way to answer “which .NET Framework version is installed.”

Installed version and loaded runtime are related questions, not identical ones.

Common Pitfalls

The biggest pitfall is using dotnet --info and assuming it reports .NET Framework versions. It mainly reports modern .NET SDKs and runtimes.

Another common mistake is relying only on Version under v4\Full. For .NET Framework 4.5+, the Release value is the important one for precise identification.

People also often mix up “framework installed on the machine” with “framework targeted by the application.” Those are not the same question.

Finally, looking only at C:\Windows\Microsoft.NET\Framework can be misleading. Registry-based checks are more dependable.

Summary

  • The easiest reliable check for .NET Framework is the Windows registry.
  • For .NET Framework 4.5+, use the Release value under NDP\v4\Full.
  • Use PowerShell for a quick and repeatable check.
  • 'dotnet --info is mainly for modern .NET, not classic .NET Framework.'
  • Distinguish between the installed framework version and the framework version an app targets.

Course illustration
Course illustration

All Rights Reserved.