How do I find the installed .NET versions?
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
The .NET framework is a pivotal element for building and running applications on Windows, and knowing which versions are installed on your system can be crucial for development and troubleshooting. Microsoft regularly updates .NET, so having a grasp of the installed versions can help ensure compatibility and leverage new features.
In this article, you will learn several methods to determine which versions of the .NET Framework and .NET Core are installed on your Windows system, using both command-line tools and graphical interfaces. We'll explore the nuances and technical specifics surrounding this task.
Checking Installed .NET Versions
There are multiple methods to determine the installed versions of .NET. These methods vary slightly based on whether you are dealing with .NET Framework or .NET Core/.NET 5+.
1. Using Command-Line Tools
.NET Framework
The .NET Framework information is stored in the Windows Registry. You can access this by using the regedit command or through PowerShell.
- PowerShell Method:Open PowerShell and run the following command:
The Release key, specifically, is used to identify newer versions (starting with .NET Framework 4.5). Here is a table mapping Release values to .NET Framework versions:
| Release Key | .NET Framework Version |
| 378389 | 4.5 |
| 378675 | 4.5.1 |
| 379893 | 4.5.2 |
| 393295 | 4.6 |
| 394254 | 4.6.1 |
| 394802 | 4.6.2 |
| 460798 | 4.7 |
| 461308 | 4.7.1 |
| 461808 | 4.7.2 |
| 528040 | 4.8 |
.NET Core / .NET 5+
- Command Prompt or PowerShell:To check .NET Core or .NET 5+ versions, use the following command in Command Prompt or PowerShell:
This command will list all installed SDKs on the system. You can also list installed runtimes using:
Example output:
2. Using the Registry Editor
For those who prefer a graphical interface, you can use the Windows Registry Editor to find the installed .NET Framework versions.
- Press
Win + R, typeregedit, and pressEnter. - Navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP. - Expand the version folders and check the
Versionstring for exact details.
3. Programmatically Determining .NET Versions
If you are developing an application and want to programmatically check installed .NET versions, both the .NET Framework and .NET Core provide classes to interact with.
.NET Framework
You can obtain the framework version in your code with System.Environment.Version. However, this only provides the CLR version, which might not completely represent the .NET Framework version post 4.5.
.NET Core / .NET 5+
For .NET Core, you can use:
This will output something like ".NET Core 3.1.13" or ".NET 5.0.3".
Conclusion
Being able to identify your installed .NET versions is a fundamental skill for developers, ensuring you can troubleshoot issues and build applications that align with the correct dependencies. Whether you're using command-line tools, registry checks, or programmatic methods, knowing how to navigate these options will prepare you for efficient and informed development on the .NET ecosystem.
By leveraging the approaches shared in this article, you'll be well-equipped to assess and manage the .NET infrastructure on your systems, ensuring compatibility and maximizing functionality.

