How to check if NET 3.5 is installed PowerShell
Skip to main content This browser is no longer supported. Show
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support. How to: Determine which .NET Framework versions are installed
In this articleUsers can install and run multiple versions of .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. The registry contains a list of the versions of .NET Framework installed on the computer. .NET Framework consists of two main components, which are versioned separately:
Community-maintained tools are available to help detect which .NET Framework versions are installed:
For information about detecting the installed updates for each version of .NET Framework, see How to: Determine which .NET Framework updates are installed. Determine which .NET implementation and version an app is running onYou can use the RuntimeInformation.FrameworkDescription property to query for which .NET implementation and version your app is running on. If the app is running on .NET Framework, the output will be similar to:
By comparison, if the app is running on .NET Core or .NET 5+, the output will be similar to:
Detect .NET Framework 4.5 and later versionsThe version of .NET Framework (4.5 and later) installed on a machine is listed in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full. If the Full subkey is missing, then .NET Framework 4.5 or above isn't installed. Note The NET Framework Setup subkey in the registry path does not begin with a period. The Release REG_DWORD value in the registry represents the version of .NET Framework installed.
Minimum versionTo determine whether a minimum version of .NET Framework is present, check for a Release REG_DWORD value that's greater than or equal to the corresponding value listed in the following table. For example, if your application runs under .NET Framework 4.8 or a later version, test for a Release REG_DWORD value that's greater than or equal to 528040.
Use Registry Editor
Use PowerShell to check for a minimum versionUse 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 .NET Framework 4.6.2 or later is installed. This code returns
Query the registry using code
The following example checks the value of the Release entry in the registry to find the versions of .NET Framework 4.5-4.8 that are installed. Tip Add the directive
The example displays output like the following:
This example follows the recommended practice for version checking:
Detect .NET Framework 1.0 through 4.0Each
version of .NET Framework from 1.1 to 4.0 is listed as a subkey at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP. The following table lists the path to each .NET Framework version. For most versions, there's an Install REG_DWORD value of Note The NET Framework Setup subkey in the registry path does not begin with a period.
Important If the app you're running is 32-bit and running in 64-bit Windows, the registry paths will be different than previously listed. The 64-bit registry is available in the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ subkey. For example, the registry subkey for .NET Framework 3.5 is HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v3.5. Notice that the registry path to the .NET Framework 1.0 subkey is different from the others. Use Registry Editor (older framework versions)
Query the registry using code (older framework versions)Use the Microsoft.Win32.RegistryKey class to access the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP subkey in the Windows registry. Important If the app you're running is 32-bit and running in 64-bit Windows, the registry paths will be different than previously listed. The 64-bit registry is available in the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ subkey. For example, the registry subkey for .NET Framework 3.5 is HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v3.5. The following example finds the versions of .NET Framework 1-4 that are installed:
The example displays output similar to the following:
Find CLR versionsThe .NET Framework CLR installed with .NET Framework is versioned separately. There are two ways to detect the version of the .NET Framework CLR:
See also
FeedbackSubmit and view feedback for Additional resourcesAdditional resourcesIn this articleHow to install .NET 3.5 in PowerShell?You can also install . NET Framework 3.5 from the command line: Using DISM: DISM /online /Enable-Feature /FeatureName:"NetFx3" Or with PowerShell: Enable-WindowsOptionalFeature -Online -FeatureName "NetFx3"
How to check net Framework version PowerShell?PowerShell Method. Download the attached script Get-NetFrameworkVersion.ps1.. Right click the script and select Run With PowerShell.. The last output will be the version of Framework 4 installed:. You are now aware of what version of . NET Framework is running on the Windows computer.. |