How to check net framework version

How to check net framework version

.NET Framework consists of two main components, which are versioned separately:

A PowerShell 2.0 module.

The NET Framework Setup subkey in the registry path does not begin with a period.

.NET Framework versionValue of Release
.NET Framework 4.5All Windows operating systems: 378389
.NET Framework 4.5.1On Windows 8.1 and Windows Server 2012 R2: 378675
On all other Windows operating systems: 378758
.NET Framework 4.5.2All Windows operating systems: 379893
.NET Framework 4.6On Windows 10: 393295
On all other Windows operating systems: 393297
.NET Framework 4.6.1On Windows 10 November Update systems: 394254
On all other Windows operating systems (including Windows 10): 394271
.NET Framework 4.6.2On Windows 10 Anniversary Update and Windows Server 2016: 394802
On all other Windows operating systems (including other Windows 10 operating systems): 394806
.NET Framework 4.7On Windows 10 Creators Update: 460798
On all other Windows operating systems (including other Windows 10 operating systems): 460805
.NET Framework 4.7.1On Windows 10 Fall Creators Update and Windows Server, version 1709: 461308
On all other Windows operating systems (including other Windows 10 operating systems): 461310
.NET Framework 4.7.2On Windows 10 April 2018 Update and Windows Server, version 1803: 461808
On all Windows operating systems other than Windows 10 April 2018 Update and Windows Server, version 1803: 461814
.NET Framework 4.8On Windows 10 May 2019 Update and Windows 10 November 2019 Update: 528040
On Windows 10 May 2020 Update and Windows 10 October 2020 Update and Windows 10 May 2021 Update: 528372
On Windows 11 and Windows Server 2022: 528449
On all other Windows operating systems (including other Windows 10 operating systems): 528049

Minimum version

.NET Framework versionMinimum value
.NET Framework 4.5378389
.NET Framework 4.5.1378675
.NET Framework 4.5.2379893
.NET Framework 4.6393295
.NET Framework 4.6.1394254
.NET Framework 4.6.2394802
.NET Framework 4.7460798
.NET Framework 4.7.1461308
.NET Framework 4.7.2461808
.NET Framework 4.8528040

Use Registry Editor

From the Start menu, choose Run, enter regedit, and then select OK.

(You must have administrative credentials to run regedit.)

How to check net framework version. Смотреть фото How to check net framework version. Смотреть картинку How to check net framework version. Картинка про How to check net framework version. Фото How to check net framework version

Use PowerShell to check for a minimum version

Use PowerShell commands to check the value of the Release entry of the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full subkey.

Query the registry using code

Use the RegistryKey.OpenBaseKey and RegistryKey.OpenSubKey methods to access the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full subkey in the Windows registry.

Add the directive using Microsoft.Win32 or Imports Microsoft.Win32 at the top of your code file if you haven’t already done so.

The example displays output like the following:

This example follows the recommended practice for version checking:

The NET Framework Setup subkey in the registry path does not begin with a period.

Framework VersionRegistry SubkeyValue
1.0HKLM\Software\Microsoft\.NETFramework\Policy\v1.0\3705Install REG_SZ equals 1
1.1HKLM\Software\Microsoft\NET Framework Setup\NDP\v1.1.4322Install REG_DWORD equals 1
2.0HKLM\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727Install REG_DWORD equals 1
3.0HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.0\SetupInstallSuccess REG_DWORD equals 1
3.5HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5Install REG_DWORD equals 1
4.0 Client ProfileHKLM\Software\Microsoft\NET Framework Setup\NDP\v4\ClientInstall REG_DWORD equals 1
4.0 Full ProfileHKLM\Software\Microsoft\NET Framework Setup\NDP\v4\FullInstall REG_DWORD equals 1

Use Registry Editor (older framework versions)

From the Start menu, choose Run, enter regedit, and then select OK.

You must have administrative credentials to run regedit.

How to check net framework version. Смотреть фото How to check net framework version. Смотреть картинку How to check net framework version. Картинка про How to check net framework version. Фото How to check net framework version

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.

The example displays output similar to the following:

Find CLR versions

The Clrver.exe tool

The Environment class

Query the Environment.Version property to retrieve a Version object.

The returned System.Version object identifies the version of the runtime that’s currently executing the code. It doesn’t return assembly versions or other versions of the runtime that may have been installed on the computer.

After you have the Version object, query it as follows:

For the major release identifier (for example, 4 for version 4.0), use the Version.Major property.

For the minor release identifier (for example, 0 for version 4.0), use the Version.Minor property.

For the entire version string (for example, 4.0.30319.18010), use the Version.ToString method. This method returns a single value that reflects the version of the runtime that’s executing the code. It doesn’t return assembly versions or other runtime versions that may be installed on the computer.

The following example uses the Environment.Version property to retrieve CLR version information:

The example displays output similar to the following:

How to check net framework version

.NET Framework consists of two main components, which are versioned separately:

A PowerShell 2.0 module.

[!NOTE] The NET Framework Setup subkey in the registry path does not begin with a period.

.NET Framework versionValue of Release
.NET Framework 4.5All Windows operating systems: 378389
.NET Framework 4.5.1On Windows 8.1 and Windows Server 2012 R2: 378675
On all other Windows operating systems: 378758
.NET Framework 4.5.2All Windows operating systems: 379893
.NET Framework 4.6On Windows 10: 393295
On all other Windows operating systems: 393297
.NET Framework 4.6.1On Windows 10 November Update systems: 394254
On all other Windows operating systems (including Windows 10): 394271
.NET Framework 4.6.2On Windows 10 Anniversary Update and Windows Server 2016: 394802
On all other Windows operating systems (including other Windows 10 operating systems): 394806
.NET Framework 4.7On Windows 10 Creators Update: 460798
On all other Windows operating systems (including other Windows 10 operating systems): 460805
.NET Framework 4.7.1On Windows 10 Fall Creators Update and Windows Server, version 1709: 461308
On all other Windows operating systems (including other Windows 10 operating systems): 461310
.NET Framework 4.7.2On Windows 10 April 2018 Update and Windows Server, version 1803: 461808
On all Windows operating systems other than Windows 10 April 2018 Update and Windows Server, version 1803: 461814
.NET Framework 4.8On Windows 10 May 2019 Update and Windows 10 November 2019 Update: 528040
On Windows 10 May 2020 Update and Windows 10 October 2020 Update and Windows 10 May 2021 Update: 528372
On Windows 11 and Windows Server 2022: 528449
On all other Windows operating systems (including other Windows 10 operating systems): 528049
.NET Framework versionMinimum value
.NET Framework 4.5378389
.NET Framework 4.5.1378675
.NET Framework 4.5.2379893
.NET Framework 4.6393295
.NET Framework 4.6.1394254
.NET Framework 4.6.2394802
.NET Framework 4.7460798
.NET Framework 4.7.1461308
.NET Framework 4.7.2461808
.NET Framework 4.8528040

Use Registry Editor

From the Start menu, choose Run, enter regedit, and then select OK.

(You must have administrative credentials to run regedit.)

How to check net framework version. Смотреть фото How to check net framework version. Смотреть картинку How to check net framework version. Картинка про How to check net framework version. Фото How to check net framework version

Use PowerShell to check for a minimum version

Use PowerShell commands to check the value of the Release entry of the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full subkey.

Query the registry using code

Use the xref:Microsoft.Win32.RegistryKey.OpenBaseKey%2A?displayProperty=nameWithType and xref:Microsoft.Win32.RegistryKey.OpenSubKey%2A?displayProperty=nameWithType methods to access the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full subkey in the Windows registry.

[!TIP] Add the directive using Microsoft.Win32 or Imports Microsoft.Win32 at the top of your code file if you haven’t already done so.

The example displays output like the following:

This example follows the recommended practice for version checking:

[!NOTE] The NET Framework Setup subkey in the registry path does not begin with a period.

Framework VersionRegistry SubkeyValue
1.0HKLM\Software\Microsoft\.NETFramework\Policy\v1.0\3705Install REG_SZ equals 1
1.1HKLM\Software\Microsoft\NET Framework Setup\NDP\v1.1.4322Install REG_DWORD equals 1
2.0HKLM\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727Install REG_DWORD equals 1
3.0HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.0\SetupInstallSuccess REG_DWORD equals 1
3.5HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5Install REG_DWORD equals 1
4.0 Client ProfileHKLM\Software\Microsoft\NET Framework Setup\NDP\v4\ClientInstall REG_DWORD equals 1
4.0 Full ProfileHKLM\Software\Microsoft\NET Framework Setup\NDP\v4\FullInstall REG_DWORD equals 1

Use Registry Editor (older framework versions)

From the Start menu, choose Run, enter regedit, and then select OK.

You must have administrative credentials to run regedit.

How to check net framework version. Смотреть фото How to check net framework version. Смотреть картинку How to check net framework version. Картинка про How to check net framework version. Фото How to check net framework version

Query the registry using code (older framework versions)

Use the xref:Microsoft.Win32.RegistryKey?displayProperty=nameWithType class to access the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP subkey in the Windows registry.

The example displays output similar to the following:

Find CLR versions

The Clrver.exe tool

The Environment class

Query the xref:System.Environment.Version?displayProperty=nameWithType property to retrieve a xref:System.Version object.

The returned System.Version object identifies the version of the runtime that’s currently executing the code. It doesn’t return assembly versions or other versions of the runtime that may have been installed on the computer.

After you have the Version object, query it as follows:

For the major release identifier (for example, 4 for version 4.0), use the xref:System.Version.Major%2A?displayProperty=nameWithType property.

For the minor release identifier (for example, 0 for version 4.0), use the xref:System.Version.Minor%2A?displayProperty=nameWithType property.

For the entire version string (for example, 4.0.30319.18010), use the xref:System.Version.ToString%2A?displayProperty=nameWithType method. This method returns a single value that reflects the version of the runtime that’s executing the code. It doesn’t return assembly versions or other runtime versions that may be installed on the computer.

The following example uses the xref:System.Environment.Version%2A?displayProperty=nameWithType property to retrieve CLR version information:

The example displays output similar to the following:

Модуль PowerShell 2.0.

Подраздел NET Framework Setup в пути реестра не начинается с точки.

Минимальная версия

Использование редактора реестра

В меню Пуск выберите Выполнить, введите regedit и нажмите кнопку ОК.

(Для запуска программы regedit необходимы учетные данные администратора.)

How to check net framework version. Смотреть фото How to check net framework version. Смотреть картинку How to check net framework version. Картинка про How to check net framework version. Фото How to check net framework version

Использование PowerShell для проверки минимальной версии

Отправка запросов в реестр с помощью кода

RegistryKey.OpenBaseKeyиспользуйте методы и RegistryKey.OpenSubKey для доступа к подразделу RegistryKey.OpenBaseKey в реестре Windows.

Добавьте директиву using Microsoft.Win32 или Imports Microsoft.Win32 в начало файла кода, если вы еще этого не сделали.

Этот пример выводит данные, подобные следующим:

В этом примере применяются рекомендации для проверки версии:

Подраздел NET Framework Setup в пути реестра не начинается с точки.

Версия платформыПодраздел реестраЗначение
1.0хклм\софтваре\микрософт\. NETFramework\Policy\v1.0\3705Установка REG_SZ равно
1,1Setup\NDP\v1.1.4322 Framework HKLM\Software\Microsoft\NETУстановка REG_DWORD равно
2.0Setup\NDP\v2.0.50727 Framework HKLM\Software\Microsoft\NETУстановка REG_DWORD равно
3.0Setup\NDP\v3.0\Setup Framework HKLM\Software\Microsoft\NETИнсталлсукцесс REG_DWORD равно
3,5Setup\NDP\v3.5 Framework HKLM\Software\Microsoft\NETУстановка REG_DWORD равно
Клиентский профиль 4.0Setup\NDP\v4\Client Framework HKLM\Software\Microsoft\NETУстановка REG_DWORD равно
Полный профиль 4.0Setup\NDP\v4\Full Framework HKLM\Software\Microsoft\NETУстановка REG_DWORD равно

Использование редактора реестра (более ранние версии платформы)

В меню Пуск выберите Выполнить, введите regedit и нажмите кнопку ОК.

Для запуска программы regedit необходимы учетные данные администратора.

How to check net framework version. Смотреть фото How to check net framework version. Смотреть картинку How to check net framework version. Картинка про How to check net framework version. Фото How to check net framework version

Запрос реестра с помощью кода (более ранние версии платформы)

Microsoft.Win32.RegistryKeyиспользуйте класс для доступа к подразделу Microsoft.Win32.RegistryKey в реестре Windows.

В этом примере отобразятся выходные данные, аналогичные следующим:

Поиск версий CLR

Инструмент Clrver.exe

Класс

Выполните запрос к свойству Environment.Version, чтобы получить объект Version.

Возвращенный объект System.Version указывает версию среды выполнения, в которой в настоящее время выполняется код. Он не содержит версий сборок или других версий среды выполнения, которые установлены на компьютере.

Получив объект Version, выполните к нему запрос:

Для основного идентификатора выпуска (например, 4 для версии 4,0) используйте свойство.

Для дополнительного идентификатора выпуска (например, 0 для версии 4,0) используйте свойство.

Для всей строки версии (например, 4.0.30319.18010) используйте метод. Он возвращает одно значение, соответствующее версии среды выполнения, в которой выполняется код. Он не возвращает версий сборок или других версий среды выполнения, которые установлены на компьютере.

В следующем примере свойство Environment.Version используется для получения сведений о версии среды CLR:

В этом примере отобразятся выходные данные, аналогичные следующим:

How to check net framework version. Смотреть фото How to check net framework version. Смотреть картинку How to check net framework version. Картинка про How to check net framework version. Фото How to check net framework version

Release Number.NET Framework version
378389.NET Framework 4.5
378675NET Framework 4.5.1 on Windows 8.1 and Windows Server 2012 R2
378758.NET Framework 4.5.1 on Windows 8, Windows 7 SP1, Windows Vista SP2
379893.NET Framework 4.5.2
393295.NET Framework 4.6 on Windows 10
393297.NET Framework 4.6
394254.NET Framework 4.6.1 on Windows 10 1511
394271.NET Framework 4.6.1
394802.NET Framework 4.6.2 on Windows 10 1607
394806.NET Framework 4.6.2
460798.NET Framework 4.7 on Windows 10 1703
460805.NET Framework 4.7
461308.NET Framework 4.7.1 on Windows 10 1709
461310.NET Framework 4.7.1
461808.NET Framework 4.7.2 on Windows 10 1803
461814.NET Framework 4.7.2
528372.NET Framework 4.8 on Windows 10 2004, 20H2, and 21H1
528040.NET Framework 4.8 on Windows 10 1903 and 1909
528449.NET Framework 4.8 on Windows Server 2022 and Windows 11
528049.NET Framework 4.8 (other Window versions)

You can get information about installed versions and releases of the NET Framework on your computer using PowerShell. The easiest way to get this information directly from the registry is by using the Get-ChildItem and Get-ItemProperty cmdlets (more about managing registry entries with PowerShell).

How to check net framework version. Смотреть фото How to check net framework version. Смотреть картинку How to check net framework version. Картинка про How to check net framework version. Фото How to check net framework version

.Net versions 2.0, 3.0, 3.5, and 4.7 are installed on this computer.

You can display only the release number for (.Net 4.x versions):

How to check net framework version. Смотреть фото How to check net framework version. Смотреть картинку How to check net framework version. Картинка про How to check net framework version. Фото How to check net framework version

How to check net framework version. Смотреть фото How to check net framework version. Смотреть картинку How to check net framework version. Картинка про How to check net framework version. Фото How to check net framework version

Or you can get a list of domain computers with the Get-ADComputer cmdlet (from the Active Directory for Windows PowerShell module). The following command will select all active Windows Server hosts in the domain:

dir %WINDIR%\Microsoft.Net\Framework\v* /O:-N /B

How to check net framework version. Смотреть фото How to check net framework version. Смотреть картинку How to check net framework version. Картинка про How to check net framework version. Фото How to check net framework version

4. .NET Version Check

How to check net framework version. Смотреть фото How to check net framework version. Смотреть картинку How to check net framework version. Картинка про How to check net framework version. Фото How to check net framework version

There is also a check on the version number of the currently installed Internet Explorer which might be useful for older systems. Some buttons are provided for copying the information to the clipboard and printing or emailing it. Inside the zip file, there is a command line version (.com file) that you can use in batch files. The command line version doesn’t need administrative privileges like the GUI version does.

The information provided in both the GUI and command line tool gives a version number as opposed to an easily readable name. That can make it difficult to determine whether minor or service pack versions are installed.

How to check net framework version. Смотреть фото How to check net framework version. Смотреть картинку How to check net framework version. Картинка про How to check net framework version. Фото How to check net framework version

How to check net framework version. Смотреть фото How to check net framework version. Смотреть картинку How to check net framework version. Картинка про How to check net framework version. Фото How to check net framework version

6. Checking Manually

How to check net framework version. Смотреть фото How to check net framework version. Смотреть картинку How to check net framework version. Картинка про How to check net framework version. Фото How to check net framework version

How to check net framework version. Смотреть фото How to check net framework version. Смотреть картинку How to check net framework version. Картинка про How to check net framework version. Фото How to check net framework version

How to check net framework version. Смотреть фото How to check net framework version. Смотреть картинку How to check net framework version. Картинка про How to check net framework version. Фото How to check net framework version

It’s not the most accurate method but at least gives you a rough idea of what’s installed by just using Windows File Explorer.

Источники информации:

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *