Users can install and run multiple versions of the .NET Framework on their computers. When you develop or deploy your app, you might need to know which .NET Framework versions are installed on the user’s computer. Note that the .NET Framework consists of two main components, which are versioned separately:
- A set of assemblies, which are collections of types and resources that provide the functionality for your apps. The .NET Framework and assemblies share the same version number.
- The common language runtime (CLR), which manages and executes your app’s code. The CLR is identified by its own version number (see Versions and Dependencies).
To get an accurate list of the .NET Framework versions installed on a computer, you can view the registry or query the registry in code:
Read the full how to ‘determine Which .NET Framework Versions Are Installed’ on Docs.microsoft.com: How to: Determine Which .NET Framework Versions Are Installed
In PowerShell use the
Get-ItemProperty cmdlet to get the installed .NET version:
PS C:\Users\jan> (Get-ItemProperty "HKLM:Software\Microsoft\NET Framework Setup\NDP\v4\Full").Version
About .NET Framework versions: Did you know you can use the
/clr parameter of AppCmd to target multiple ASP.NET CLR versions with AppCmd? CLR stands for Common Language Runtime. Pretty neat heh? :)