Где посмотреть версию net framework windows 10

В Windows одновременно можно одновременно установить и запустить несколько версий .NET Framework. При разработке или развертывания нового приложения,

В Windows одновременно можно одновременно установить и запустить несколько версий .NET Framework. При разработке или развертывания нового приложения, основанного на библиотеках .NET, иногда нужно предварительно узнать какие версии и пакеты обновления .Net Framework уже установлены на компьютере пользователя или на сервере. Вы можете получить список версий .NET Framework, установленных на компьютере, несколькими способами.

Содержание:

  • Информация об установленных версиях .NET Framework в реестре
  • Как узнать версию .NET Framework с помощью PowerShell?
  • Проверить версию .Net Framework на удаленных компьютерах
  • Вывести версии .NET Framework в командной строке

Информация об установленных версиях .NET Framework в реестре

При установке или обновлении любой версии .NET Framework, изменения записываются в реестр Windows.

Откройте редактор реестра (regedit.exe) и перейдите в раздел HKLM SOFTWAREMicrosoftNET Framework SetupNDP. В этой ветке хранится информация обо всех версиях .NET на компьютере. Разверните любой раздел и обратите внимание на следующие параметры (для .Net 4.x нужно развернуть ветку Full):

  • Install — флаг установки (если равен 1, значит данная версия .Net установлена на компьютере);
  • Install Path — каталог, в который установлена данная версия .Net;
  • Release — номер релиза .Net;
  • Version — полный номер версии .Net Framework.

версии .Net Framework в реестре

Примечание. Для .NET 4.0 и выше, если подраздел Full отсутствует, это значит, что данная версия Framework на компьютере не установлена.

К примеру, в данном примере видно, что на компьютере установлены .NET Framework v2.0.50727, 3.0, 3.5 и 4.7 (релиз 460805).

Обратите внимание, что в серверных ОС начиная с Windows Server 2012, все базовые версии .Net (3.5 и 4.5) является частью системы и устанавливаются в виде отдельного компонента (Установка .NET Framework 3.5 в Windows Server 2016, в Windows Server 2012 R2), а минорные (4.5.1, 4.5.2 и т.д.) устанавливаются уже в виде обновлений через Windows Update или WSUS.

С помощью следующей таблицы вы можете установить соответствие между номером релиза и версией .NET Framework (применимо к .NET 4.5 и выше).

Значение DWORD параметра Release Версия .NET Framework
378389 .NET Framework 4.5
378675 NET Framework 4.5.1 на Windows 8.1 / Windows Server 2012 R2
378758 .NET Framework 4.5.1 на Windows 8, Windows 7 SP1, Windows Vista SP2
379893 .NET Framework 4.5.2
393295 .NET Framework 4.6 на Windows 10
393297 .NET Framework 4.6
394254 .NET Framework 4.6.1 на Windows 10 1511
394271 .NET Framework 4.6.1
394802 .NET Framework 4.6.2 на Windows 10 1607
394806 .NET Framework 4.6.2
460798 .NET Framework 4.7 на Windows 10 1703
460805 .NET Framework 4.7
461308 .NET Framework 4.7.1 на Windows 10 1709
461310 .NET Framework 4.7.1
461808 .NET Framework 4.7.2 на Windows 10 1803
461814 .NET Framework 4.7.2
528372 .NET Framework 4.8 на Windows 10 2004, 20H2, и 21H1
528040 .NET Framework 4.8 на Windows 10 1903 и 1909
528449 .NET Framework 4.8 в Windows Server 2022 и Windows 11
528049 .NET Framework 4.8 (остальные версии Window)

.NET Framework 4.8 сегодня — самая последняя доступная версия .NET Framework.

Как узнать версию .NET Framework с помощью PowerShell?

Можно получить информацию об установленных версиях и релизах NET Framework на компьютере с помощью PowerShell. Проще всего получить эти данные напрямую из реестра с помощью командлетов
Get-ChildItem
и
Get-ItemProperty
(подробнее о работе с записями реестра из PowerShell).

Чтобы вывести таблицу по всем версиям .Net Framework на компьютере, выполните команду:

Get-ChildItem ‘HKLM:SOFTWAREMicrosoftNET Framework SetupNDP’ -Recurse | Get-ItemProperty -Name version -EA 0 | Where { $_.PSChildName -Match ‘^(?!S)p{L}’} | Select PSChildName, version

вывести список установленных версий .net framework с помощью powershell

На этом компьютере установлены версии .Net 2.0, 3.0, 3.5 и 4.7.

Начиная с версии .Net v4.0 более новая версия Framework перезаписывает (заменяет) старую версию. Т.е. если на компьютере был установлен .NET Framework 4.7, то при установке .NET Framework 4.8, старая версия пропадет.

Можно вывести только номер релиза (для версий .Net 4.x):

(Get-ItemProperty ‘HKLM:SOFTWAREMicrosoftNET Framework SetupNDPv4Full’  -Name Release).Release

получить номер релиза net framework из консоли powershell

Согласно таблице, номер 528449 соответствует версии .Net Framework 4.8 в Windows 11.

Проверить версию .Net Framework на удаленных компьютерах

Вы можете удаленно получить список версий .Net Framework, установленных на компьютерах в вашей сети помощью PowerShell.

Ниже представлен небольшой PowerShell скрипт, который получает список компьютеров из текстового файла и проверяет на всех версию .Net Framework. Для запуска команд на удаленных компьютерах используется WinRM командлет Invoke-Command.

Function GetNetFramework {
Get-ChildItem 'HKLM:SOFTWAREMicrosoftNET Framework SetupNDP' -recurse |
Get-ItemProperty -name Version,Release -EA 0 |
Where { $_.PSChildName -match '^(?![SW])p{L}'} |
Select PSChildName, Version, Release, @{
name="Product"
expression={
switch -regex ($_.Release) {
"378389" { [Version]"4.5" }
"378675|378758" { [Version]"4.5.1" }
"379893" { [Version]"4.5.2" }
"393295|393297" { [Version]"4.6" }
"394254|394271" { [Version]"4.6.1" }
"394802|394806" { [Version]"4.6.2" }
"460798|460805" { [Version]"4.7" }
"461308|461310" { [Version]"4.7.1" }
"461808|461814" { [Version]"4.7.2" }
"528040|528049|528449|528372" { [Version]"4.8" }
{$_ -gt 528449} { [Version]"Undocumented version (> 4.8)" }
}
}
}
}
[email protected]()
$servers= Get-Content C:PSservers.txt
foreach ($server in $servers)
{
$result+=Invoke-Command -ComputerName $server -ScriptBlock $function:GetNetFramework
}
$result|  select PSComputerName,@{name = ".NET Framework"; expression = {$_.PSChildName}},Product,Version,Release| Out-GridView

Скрипт выводит табличку (через Out-GridView) со списком версий .Net Framework, установленных на удаленных компьютерах.

poweshell скрипт для получения версий net framework на удаленных компьютерах

Также вы можете задать список компьютеров, на которых нужно проверить .NET так:

$servers= @("pc1","pc2","pc3","pc4","pc5")

Или выбрать список компьютеров из домена с помощью командлета Get-ADComputer из модуля AD PowerShell. Следующая команда выберет все активные хосты Windows Server в домене:

$servers= Get-ADComputer -Filter 'operatingsystem -like "*Windows server*" -and enabled -eq "true"'

Вывести версии .NET Framework в командной строке

Все версии.NET Framework устанавливаются в следующие каталоги Windows:

  • %SystemRoot%Microsoft.NETFramework
  • %SystemRoot%Microsoft.NETFramework64

Вы можете просто открыть этот каталог и увидеть список установленных версий .NET. Каждой версии соответствует отдельный каталог с символом v и номером версии в качестве имени папки. Можно вывести список установленных версий .NET Framework из команды строки:

dir %WINDIR%Microsoft.NetFrameworkv* /O:-N /B

узнать версию net framework из командной строки windows

Команда выведет все установленные версии кроме 4.5, т.к. .NET Framework 4.5 устанавливается в подкаталог v4.0.xxxxx.

Introduction

In this article, you will learn how to find the .NET Framework version that’s installed on your Windows 10 PC?

There are some ways by which you can easily find it. Here’s how,

Find the .NET Framework Version using File Explorer

We can check the version from File Explorer. For this, we need to move to the C:WindowsMicrosoft.NETFramework folder on your system.

Please follow the below steps,

Step 1

First, open run and press Windows+R keys at the same time.

Step 2

In the Run box, type the following path and press Enter.

C:WindowsMicrosoft.NETFramework

How To Check .NET Framework Version On Windows 10

If you’ve installed Windows 10 on another drive then replace “C” with the letter of your Windows installation drive.

Step 3

In the Framework folder, we will look for the folder that shows the highest version number. Which is “v4.0.30319” in my system. Double-click this folder to open it.

How To Check .NET Framework Version On Windows 10

Step 4

Now we can see that in this folder there is a file name “Accessibility.dll”.

How To Check .NET Framework Version On Windows 10

Step 5

Right-click on this file “Accessibility.dll” and select “Properties.”

How To Check .NET Framework Version On Windows 10

Step 6

Click on the “Properties”.

As you are shown below we click the “Details” tab at the top.

How To Check .NET Framework Version On Windows 10

AS you can see the “Details” tab shows various information about the Accessibility.dll file.

Here, you can see the value of “Product version = 4.8.4084.0” this is the most recent .NET Framework version installed on your system.

That’s all. I hope now you can easily check your .NET framework version.

Check the .NET Framework Version using PowerShell command

Another easy way to check your .NET Framework version is by using a PowerShell command.

Please follow the below steps,

Step 1

Click on the start menu and search for “Windows PowerShell,” once it will appear then open it.

How To Check .NET Framework Version On Windows 10

Step 2

When you open PowerShell you will get this window,

How To Check .NET Framework Version On Windows 10

Step 3

Paste the following command and press Enter,

Get-ChildItem 'HKLM:SOFTWAREMicrosoftNET Framework SetupNDP' -Recurse | Get-ItemProperty -Name version -EA 0 | Where { $_.PSChildName -Match '^(?!S)p{L}'} | Select PSChildName, version

How To Check .NET Framework Version On Windows 10

Step 4

In the below image you can see that here is a list of .NET Framework versions installed on your system. You can see the highest number is “4.8.4084.0” which is the most recent framework version on your PC.

How To Check .NET Framework Version On Windows 10

Now you are able to check your .NET framework version by using the PowerShell command.

For more articles on windows 10 please check from here,

  • Windows 10 articles

Introduction

In this article, you will learn how to find the .NET Framework version that’s installed on your Windows 10 PC?

There are some ways by which you can easily find it. Here’s how,

Find the .NET Framework Version using File Explorer

We can check the version from File Explorer. For this, we need to move to the C:WindowsMicrosoft.NETFramework folder on your system.

Please follow the below steps,

Step 1

First, open run and press Windows+R keys at the same time.

Step 2

In the Run box, type the following path and press Enter.

C:WindowsMicrosoft.NETFramework

How To Check .NET Framework Version On Windows 10

If you’ve installed Windows 10 on another drive then replace “C” with the letter of your Windows installation drive.

Step 3

In the Framework folder, we will look for the folder that shows the highest version number. Which is “v4.0.30319” in my system. Double-click this folder to open it.

How To Check .NET Framework Version On Windows 10

Step 4

Now we can see that in this folder there is a file name “Accessibility.dll”.

How To Check .NET Framework Version On Windows 10

Step 5

Right-click on this file “Accessibility.dll” and select “Properties.”

How To Check .NET Framework Version On Windows 10

Step 6

Click on the “Properties”.

As you are shown below we click the “Details” tab at the top.

How To Check .NET Framework Version On Windows 10

AS you can see the “Details” tab shows various information about the Accessibility.dll file.

Here, you can see the value of “Product version = 4.8.4084.0” this is the most recent .NET Framework version installed on your system.

That’s all. I hope now you can easily check your .NET framework version.

Check the .NET Framework Version using PowerShell command

Another easy way to check your .NET Framework version is by using a PowerShell command.

Please follow the below steps,

Step 1

Click on the start menu and search for “Windows PowerShell,” once it will appear then open it.

How To Check .NET Framework Version On Windows 10

Step 2

When you open PowerShell you will get this window,

How To Check .NET Framework Version On Windows 10

Step 3

Paste the following command and press Enter,

Get-ChildItem 'HKLM:SOFTWAREMicrosoftNET Framework SetupNDP' -Recurse | Get-ItemProperty -Name version -EA 0 | Where { $_.PSChildName -Match '^(?!S)p{L}'} | Select PSChildName, version

How To Check .NET Framework Version On Windows 10

Step 4

In the below image you can see that here is a list of .NET Framework versions installed on your system. You can see the highest number is “4.8.4084.0” which is the most recent framework version on your PC.

How To Check .NET Framework Version On Windows 10

Now you are able to check your .NET framework version by using the PowerShell command.

For more articles on windows 10 please check from here,

  • Windows 10 articles

Как можно узнать свою версию .NET Framework в ОС Windows 10 – 5 способов

Операционная система Windows 10 состоит из множества компонентов. Многие из них устанавливаются отдельно и далеко не всегда присутствуют в стоковой ОС. .NET Framework – это пакет библиотек, необходимых для корректной работы компьютера. Специальная платформа отвечает за запуск программ и приложений, а потому вопрос о том, как узнать версию .NET Framework в операционной системе Windows 10, становится очень важным.

Для чего нужно знать версию

Пакет библиотек регулярно обновляется. С очередным апдейтом пользователь получает доступ к новым функциям, которые не были доступны ранее. Зная, какой Framework установлен на компьютере, владелец ПК поймет, стоит ли ему обновляться.

screenshot_1

Но даже в том случае, когда человек не заинтересован в получении новых фишек, ему все равно стоит знать о текущей версии программной платформы. Дело в том, что старый пакет .NET Framework не позволит запустить свежие приложения. А установка актуальной библиотеки становится универсальным решением проблем, связанных с запуском игр и программ на компьютере.

Важно. Одновременно с текущей версией библиотеки на ПК должны быть установлены предыдущие редакции. Все это необходимо для совместимости со старыми приложениями.

screenshot_2

Как узнать версию .Net Framework на Windows 10

На компьютере может быть установлено сразу несколько поколений библиотек. От старых редакций не следует избавляться, поскольку от них тоже есть определенная польза, пускай и не такая большая, как в случае с актуальным ПО.

К сожалению, Windows 10 не располагает стандартными средствами определения текущего поколения Framework. Чтобы получить соответствующую информацию, пользователю придется выполнить несколько шагов через системное ПО, к которому обычно обращаются специалисты. Впрочем, переживать по этому поводу не стоит, поскольку все действия подробно описаны в инструкции. Остается выбрать наиболее подходящий вариант.

screenshot_3

Через реестр

Первый способ, позволяющий проверить версию библиотеки, – обращение к Редактору реестра. В него заложен файл, содержащий в себе информацию о поколениях необходимого нам ПО, установленного на компьютере. А для выполнения операции используется следующая инструкция:

  • Зажмите клавиши «Win» + «R», чтобы открыть окно «Выполнить».
  • Введите запрос «regedit», а затем нажмите клавишу «Enter» или кнопку «OK».

screenshot_4

  • Оказавшись в Редакторе, перейдите в директорию: «HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDP».

screenshot_5

  • Обратите внимание на папки, содержащиеся в каталоге.

screenshot_6

В директории «NDP» пользователь увидит папки с названиями вроде «v2.0», «v3.0», «v4.0» и так далее. Их имена свидетельствуют о поколении установленной библиотеки. Чтобы узнать конкретную версию, откройте подпапку и кликните по файлу «Version». В строке «Значение» будет указана текущая версия сборки.

С помощью PowerShell

Также посмотреть версию программного обеспечения можно через консоль PowerShell. Она представляет собой расширенную Командную строку, где при помощи специальных запросов системой отрабатываются действия. В данном случае нас будет интересовать команда, выдающая информацию о версии библиотеки.

screenshot_7

Найти PowerShell можно через поисковую строку Windows 10. Далее в открывшемся окне остается ввести запрос «(Get-ItemProperty ‘HKLM:SOFTWAREMicrosoftNET Framework SetupNDPv4Full’ -Name Release).Release» и нажать клавишу «Enter». После этого на экране компьютера высветится информация о текущем поколении ПО.

screenshot_8

Важно. Вместо «v4» в запросе должна использоваться именно та сборка библиотеки, для которой требуется определить версию. Например, «v5» или «v3».

screenshot_9

Программа Raymondcc .NET Detector

Поскольку встроенные средства Windows 10 не очень удобны для получения информации о сборке библиотеки, пользователям приходится обращаться к помощи стороннего ПО. И здесь отлично помогает утилита Raymondcc .NET Detector. Ее можно скачать с официального сайта разработчиков asoft.be.

Само по себе приложение не требует установки. Владелец ПК запускает exe-файл после распаковки архива. Затем на экране компьютера высвечивается интерфейс утилиты, на главном экране которого содержится вся необходимая информация. Так, поколения сборок специально разделены по цветам, чтобы пользователю было легче ориентироваться в интерфейсе. В соответствующем поле указывается конкретная версия Framework (например, 4.7.1).

Если нужное для запуска определенных программ поколение библиотек отсутствует – достаточно кликнуть по недостающей сборке, после чего пользователь переместится на страницу загрузки ПО. А там останется скачать актуальную версию программной платформы и запустить exe-файл для установки апдейта.

screenshot_10

Встроенная утилита CLRver.exe

Хорошим методом определения сборки можно назвать ввод запроса «CLRver.exe» через Командную строку. Он вызывает одноименную утилиту, а в нижней части КС после нажатия клавиши «Enter» высветятся те сборки .NET Framework, которые установлены на компьютере.

На заметку. Открыть Командную строку можно через панель меню Пуск или при помощи окна «Выполнить» по запросу «cmd».

screenshot_11

Скрипт для PowerShell

Наконец, предусмотрен скрипт, который показывает, какой пакет библиотек установлен на компьютере. Алгоритм действий здесь напоминает предыдущий метод, однако, вместо Командной строки, нужно воспользоваться консолью PowerShell:

  • Откройте консоль.

screenshot_12

  • Введите запрос «Install-Module -Name DotNetVersionLister -Scope CurrentUser #-Force».

screenshot_13

  • Нажмите клавишу «Enter».
  • Введите команду «Get-STDotNetVersion» и нажмите «Enter».

screenshot_14

Теперь останется ознакомиться с информацией, появившейся на экране. Она содержит в себе сведения об уже установленных и недостающих версиях Framework.



title description ms.date dev_langs helpviewer_keywords ms.assetid

Determine which .NET Framework versions are installed

Use code, regedit.exe, or PowerShell to detect which versions of .NET Framework are installed on a machine by querying the Windows registry.

09/29/2022

csharp

vb

versions, determining for .NET Framework

.NET Framework, determining installed versions

40a67826-e4df-4f59-a651-d9eb0fdc755d

Users 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.

[!NOTE]
This article is specific to .NET Framework. To determine which .NET Core and .NET 5+ SDKs and runtimes are installed, see How to check that .NET is already installed.

.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. .NET Framework and the assemblies share the same version number. For example, .NET Framework versions include 4.5, 4.6.1, and 4.7.2.

  • The common language runtime (CLR), which manages and executes your app’s code. A single CLR version typically supports multiple .NET Framework versions. For example, CLR version 4.0.30319.xxxxx where xxxxx is less than 42000, supports .NET Framework versions 4 through 4.5.2. CLR version greater than or equal to 4.0.30319.42000 supports .NET Framework versions starting with .NET Framework 4.6.

Community-maintained tools are available to help detect which .NET Framework versions are installed:

  • https://github.com/jmalarcon/DotNetVersions

    A .NET Framework 2.0 command-line tool.

  • https://github.com/EliteLoser/DotNetVersionLister

    A PowerShell 2.0 module.

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 on

You can use the xref:System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription?displayProperty=nameWithType 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:

.NET Framework 4.8.4250.0

By comparison, if the app is running on .NET Core or .NET 5+, the output will be similar to:

.NET Core 3.1.9
.NET 5.0.0

Detect .NET Framework 4.5 and later versions

The version of .NET Framework (4.5 and later) installed on a machine is listed in the registry at HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv4Full. 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.

.NET Framework version Value of Release
.NET Framework 4.5 All Windows operating systems: 378389
.NET Framework 4.5.1 On Windows 8.1 and Windows Server 2012 R2: 378675
On all other Windows operating systems: 378758
.NET Framework 4.5.2 All Windows operating systems: 379893
.NET Framework 4.6 On Windows 10: 393295
On all other Windows operating systems: 393297
.NET Framework 4.6.1 On Windows 10 November Update systems: 394254
On all other Windows operating systems (including Windows 10): 394271
.NET Framework 4.6.2 On 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.7 On Windows 10 Creators Update: 460798
On all other Windows operating systems (including other Windows 10 operating systems): 460805
.NET Framework 4.7.1 On 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.2 On 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.8 On Windows 10 May 2019 Update and Windows 10 November 2019 Update: 528040
On Windows 10 May 2020 Update, October 2020 Update, May 2021 Update, November 2021 Update, and 2022 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 4.8.1 On Windows 11 2022 Update: 533320
All other Windows operating systems: 533325

Minimum version

To 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.

.NET Framework version Minimum value
.NET Framework 4.5 378389
.NET Framework 4.5.1 378675
.NET Framework 4.5.2 379893
.NET Framework 4.6 393295
.NET Framework 4.6.1 394254
.NET Framework 4.6.2 394802
.NET Framework 4.7 460798
.NET Framework 4.7.1 461308
.NET Framework 4.7.2 461808
.NET Framework 4.8 528040
.NET Framework 4.8.1 533320

Use Registry Editor

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

    (You must have administrative credentials to run regedit.)

  2. In the Registry Editor, open the following subkey: HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv4Full. If the Full subkey isn’t present, then you don’t have .NET Framework 4.5 or later installed.

  3. Check for a REG_DWORD entry named Release. If it exists, then you have .NET Framework 4.5 or later installed. Its value corresponds to a particular version of .NET Framework. In the following figure, for example, the value of the Release entry is 528040, which is the release key for .NET Framework 4.8.

    Registry entry for .NET Framework 4.5

Use PowerShell to check for a minimum version

Use PowerShell commands to check the value of the Release entry of the HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv4Full 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 True if it’s installed and False otherwise.

(Get-ItemProperty "HKLM:SOFTWAREMicrosoftNET Framework SetupNDPv4Full").Release -ge 394802

Query the registry using code

  1. 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_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv4Full 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_MACHINESOFTWAREWow6432Node subkey. For example, the registry subkey for .NET Framework 4.5 is HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftNET Framework SetupNDPv4Full.

  2. Check the Release REG_DWORD value to determine the installed version. To be forward-compatible, check for a value greater than or equal to the value listed in the .NET Framework version table.

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 using Microsoft.Win32 or Imports Microsoft.Win32 at the top of your code file if you haven’t already done so.

:::code language=»csharp» source=»snippets/csharp/versions-installed.cs» id=»2″:::

:::code language=»vb» source=»snippets/visual-basic/versions-installed.vb» id=»2″:::

The example displays output like the following:

.NET Framework Version: 4.6.1

This example follows the recommended practice for version checking:

  • It checks whether the value of the Release entry is greater than or equal to the value of the known release keys.
  • It checks in order from most recent version to earliest version.

Detect .NET Framework 1.0 through 4.0

Each version of .NET Framework from 1.1 to 4.0 is listed as a subkey at HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDP. The following table lists the path to each .NET Framework version. For most versions, there’s an Install REG_DWORD value of 1 to indicate this version is installed. In these subkeys, there’s also a Version REG_SZ value that contains a version string.

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

Framework Version Registry Subkey Value
1.0 HKLMSoftwareMicrosoft.NETFrameworkPolicyv1.03705 Install REG_SZ equals 1
1.1 HKLMSoftwareMicrosoftNET Framework SetupNDPv1.1.4322 Install REG_DWORD equals 1
2.0 HKLMSoftwareMicrosoftNET Framework SetupNDPv2.0.50727 Install REG_DWORD equals 1
3.0 HKLMSoftwareMicrosoftNET Framework SetupNDPv3.0Setup InstallSuccess REG_DWORD equals 1
3.5 HKLMSoftwareMicrosoftNET Framework SetupNDPv3.5 Install REG_DWORD equals 1
4.0 Client Profile HKLMSoftwareMicrosoftNET Framework SetupNDPv4Client Install REG_DWORD equals 1
4.0 Full Profile HKLMSoftwareMicrosoftNET Framework SetupNDPv4Full Install REG_DWORD equals 1

[!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_MACHINESOFTWAREWow6432Node subkey. For example, the registry subkey for .NET Framework 3.5 is HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftNET Framework SetupNDPv3.5.

Notice that the registry path to the .NET Framework 1.0 subkey is different from the others.

Use Registry Editor (older framework versions)

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

    You must have administrative credentials to run regedit.

  2. Open the subkey that matches the version you want to check. Use the table in the Detect .NET Framework 1.0 through 4.0 section.

    The following figure shows the subkey and its Version value for .NET Framework 3.5.

    The registry entry for .NET Framework 3.5.

Query the registry using code (older framework versions)

Use the xref:Microsoft.Win32.RegistryKey?displayProperty=nameWithType class to access the HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDP 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_MACHINESOFTWAREWow6432Node subkey. For example, the registry subkey for .NET Framework 3.5 is HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftNET Framework SetupNDPv3.5.

The following example finds the versions of .NET Framework 1-4 that are installed:

:::code language=»csharp» source=»snippets/csharp/versions-installed.cs» id=»1″:::

:::code language=»vb» source=»snippets/visual-basic/versions-installed.vb» id=»1″:::

The example displays output similar to the following:

v2.0.50727  2.0.50727.4927  SP2
v3.0  3.0.30729.4926  SP2
v3.5  3.5.30729.4926  SP1
v4.0
  Client  4.0.0.0

Find CLR versions

The .NET Framework CLR installed with .NET Framework is versioned separately. There are two ways to detect the version of the .NET Framework CLR:

  • The Clrver.exe tool

    Use the CLR Version tool (Clrver.exe) to determine which versions of the CLR are installed on a computer. Open Visual Studio Developer Command Prompt or Visual Studio Developer PowerShell and enter clrver.

    Sample output:

    Versions installed on the machine:
    v2.0.50727
    v4.0.30319
  • The Environment class

    [!IMPORTANT]
    For .NET Framework 4.5 and later versions, don’t use the xref:System.Environment.Version%2A?displayProperty=nameWithType property to detect the version of the CLR. Instead, query the registry as described in Detect .NET Framework 4.5 and later versions.

    1. 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.

      For .NET Framework versions 4, 4.5, 4.5.1, and 4.5.2, the string representation of the returned xref:System.Version object has the form 4.0.30319.xxxxx, where xxxxx is less than 42000. For .NET Framework 4.6 and later versions, it has the form 4.0.30319.42000.

    2. 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:

    Console.WriteLine($"Version: {Environment.Version}");
    Console.WriteLine($"Version: {Environment.Version}")

    The example displays output similar to the following:

See also

  • How to: Determine which .NET Framework updates are installed
  • Troubleshoot: Determine which versions and service packs of .NET Framework are installed
  • Install .NET Framework for developers
  • .NET Framework versions and dependencies

NET Framework — содержит в себе библиотеки для разработки различных приложений. Это API, который упрощает работу разработчикам в написании кода. Имеются много версий NET Framework 2.0, 3.5, 4.8, которые нужны для запуска игр или программ. Чем ниже версия, тем она старее и нужна для запуска более старых приложений. В определенные моменты, нужно знать какая версия NET Framework установлена или присутствует в системе Windows 10, чтобы её переустановить или установить недостающую.

Через реестр

Нажмите сочетание кнопок Win+R и введите regedit, чтобы открыть редактор реестра. В реестре перейдите по пути:

  • HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDP
  • В папке NDP будут представлены сборки NET Framework.
  • Раздвиньте список сборки и с правой стороны найдите значение Version.

В моем случае я проверят сборку 4 и мне показало, что версия NET Framework 4.8.

узнать версию NET Framework через реестр

Через PowerShell

Запустите PowerShell от имени администратора и введите следующий апплет:

  • Get-ChildItem 'HKLM:SOFTWAREMicrosoftNET Framework SetupNDP' -Recurse | Get-ItemProperty -Name version -EA 0 | Where { $_.PSChildName -Match '^(?!S)p{L}'} | Select PSChildName, version

узнать версию NET Framework powershell

Список установленных версий

Мы также можем узнать какие версии NET Framework установлены в системе Windows. Для этого Microsoft в своей справке рекомендуют воспользоваться скриптом на GitHub. Запустите PowerShell от имени администратора и введите ниже команду для установки скрипта:

  • Install-Module -Name DotNetVersionLister -Scope CurrentUser #-Force
  • Нажмите Y и Enetr, чтобы установить скрипт.

Установка DotNetVersions

Далее введите команду, чтобы вывести список установленных версий NET Framework.

  • Get-STDotNetVersion

Get-STDotNetVersion

Программа Raymondcc .NET Detector

Raymondcc .NET Detector — программа, которая быстро покажет вам список всех версий NET Framework, установленных и не установленных. Перейдите на официальный сайт и загрузите программу.

  • Пароль от архива — raymondcc

Raymondcc .NET Detector


Смотрите еще:

  • Как установить NET Framework 2.0 3.0 и 3.5 в Windows 10
  • Ошибка 0x800f0954 при установке NET Framework 3.5
  • Как узнать версию, сборку, выпуск и тип системы Windows 10
  • Узнать срок службы SSD диска 
  • GPT или MBR — Как узнать разметку диска

[ Telegram | Поддержать ]

Содержание

  • Определяем установленную версию .NET Framework на компьютере
    • Способ 1: ASoft .NET Version Detector
    • Способ 2: Раздел «Программы и компоненты»
    • Способ 3: Редактор реестра
    • Способ 4: Скрипт для PowerShell
  • Вопросы и ответы

Как узнать версию NET Framework

Библиотеки .NET Framework активно используются различным программным обеспечением при запуске и инсталляции. На данный момент времени уже была выпущена масса версий этого системного компонента, каждая из которых имеет в себе определенные файлы. Иногда требуется узнать, присутствует ли на компьютере определенная версия .NET Framework, чтобы после этого установить недостающие элементы либо начать инсталляцию ПО. В определении интересующего параметра помогут несколько способов, о которых мы и хотим поговорить далее.

Практически все приведенные ниже методы не требуют использования дополнительного софта для определения версии необходимой библиотеки, однако нельзя не отметить и сторонние решения, которые могут пригодиться юзерам разных категорий. Поэтому мы предлагаем сначала ознакомиться со всеми вариантами, а уже потом выбрать понравившийся.

Способ 1: ASoft .NET Version Detector

Выше мы уже упомянули стороннее программное обеспечение, поэтому давайте сразу разберемся с ним. В качестве дополнительного решения будем использовать ASoft .NET Version Detector — бесплатное ПО для определения установленных на компьютере версий .NET Framework. Вся задача осуществляется буквально в несколько кликов:

Скачать ASoft .NET Version Detector с официального сайта

  1. Перейдите по указанной выше ссылке и на сайте нажмите на соответствующую кнопку для начала скачивания ASoft .NET Version Detector.
  2. Скачивание ASoft NET Version Detector с официального сайта

  3. По завершении скачивания запустите приложение из архива.
  4. Запуск ASoft NET Version Detector через архив

  5. Подтвердите правила лицензионного соглашения.
  6. Подтверждение лицензионного соглашения ASoft NET Version Detector перед запуском

  7. В отдельных колонках будут отображаться все существующие версии рассматриваемого компонента и источники, из которых они были получены.
  8. Определение версии Framework в программе ASoft NET Version Detector

  9. При необходимости скачивания какой-либо из них нажмите на специально отведенную кнопку.
  10. Скачивание недостающих компонентов через программу ASoft NET Version Detector

Хоть ASoft .NET Version Detector — бесплатное и удобное обеспечение, не у каждого пользователя есть желание или возможность скачать его. В таких случаях мы рекомендуем прибегать к стандартным инструментам операционной системы.

Способ 2: Раздел «Программы и компоненты»

Практически каждый пользователь операционной системы Windows хоть раз сталкивался с разделом «Программы и компоненты». Обычно туда заходят, чтобы удалить какое-либо ПО или проверить последние установленные обновления. В этот раз мы задействуем присутствующую там информацию для получения сведений о версии .NET Framework.

  1. Откройте «Пуск» и перейдите в «Панель управления».
  2. Переход к панели управления Windows для определения версии NET Framework

  3. Среди всех значков отыщите «Программы и компоненты». Кликните по нему дважды ЛКМ, чтобы перейти.
  4. Открыть раздел программы и компоненты для определения версии NET Framework

  5. Опуститесь вниз по списку и отыщите NET.Framework. В конце строки указывается версия.
  6. Определение установленных версий NET Framework через программы и компоненты в Windows

    Lumpics.ru

Если вдруг вы обнаружили, что там присутствует более одной строки и указаны разные версии, это значит, что на этом компьютере установлен весь перечень сборок и были добавлены все файлы этих библиотек.

Способ 3: Редактор реестра

Значения большинства системных параметров операционной системы хранятся в редакторе реестра в виде отдельных файлов определенных форматов. Юзеры, уже столкнувшиеся с данным меню, знают, что там достаточно сложно найти какое-либо необходимое сведение без применения специальных инструкций. Это касается и определения версии рассматриваемой библиотеки. Поэтому мы предлагаем ознакомиться со следующим руководством.

  1. Откройте утилиту «Выполнить», зажав комбинацию Win + R. В поле введите regedit и нажмите на клавишу Enter или виртуальную кнопку «ОК».
  2. Переход к редактор реестра для определения версий NET Framework

  3. Перейдите по пути HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDP, где отыщите отдельные директории с версиями .NET Framework.
  4. Переход к папкам с NET Framework для определения установленных версий

  5. Выберите одну из них и раскройте каталог Client или Full. Там отыщите параметр Install. Если его значение 1, значит данная версия установлена на компьютере. 0 обозначает отсутствие компонента.
  6. Определение установленных версий NET Framework через редактор реестра

Далее мы еще вернемся с редактору реестра и покажем, как еще проще определить инсталлированную версию компонента даже без открытия этого меню.

Способ 4: Скрипт для PowerShell

Начинающие пользователи вряд ли слышали о PowerShell, однако многие опытные знакомы с этой оболочкой. Данная утилита представлена в виде командной строки, где используется специальный язык управления сценариями, позволяющий запускать самые разнообразные скрипты. В этот раз мы задействуем PowerShell для определения версии компонента, а сделаем это следующим образом:

  1. Откройте «Пуск» и через поиск найдите нужное приложение. Запустите его от имени администратора.
  2. Запуск PowerShell для определения версии NET Framework

  3. Обладателям Windows 7 понадобится ввести команду (Get-ItemProperty "HKLM:SOFTWAREMicrosoftNET Framework SetupNDPv4Full").Release -ge 394802, а в Виндовс 10 — Get-ChildItem 'HKLM:SOFTWAREMicrosoftNET Framework SetupNDPv4Full' | Get-ItemPropertyValue -Name Release | Foreach-Object { $_ -ge 394802 }. Затем потребуется нажать на клавишу Enter. Число 394802 обозначает поиск файла в редакторе реестра, о чем мы детальнее поговорим далее.
  4. Ввод скрипта для определения версии NET Framework в PowerShell

  5. Если запрашиваемый компонент не найден, появится результат False.
  6. Результат False в PowerShell при определении версии NET Framework

  7. В случае успеха отобразится True, что означает — искомая версия установлена.
  8. Результат True при определении версии NET Framework

Упомянутый выше номер у каждой версии разный. На официальном сайте компании Microsoft присутствует детальное описание этой информации. Перейдите по указанной ниже ссылке, чтобы ознакомиться с ней. После во вводимой команде уже нужно будет поставить определенный номер.

Версии и зависимости платформы .NET Framework

В рамках сегодняшней статьи вы узнали о четырех доступных методах определения установленных на компьютере версий .NET Framework. Найденные сведения помогут определиться с тем, какие дополнительные библиотеки следует установить.

Подробнее: Как обновить .NET Framework

Еще статьи по данной теме:

Помогла ли Вам статья?

How do I find out which version of .NET is installed?

I’m looking for something as simple as java -version that I can type at the command prompt and that tells me the current version(s) installed.

I better add that Visual Studio may not be installed — this is typically something that I want to know about a client machine.

Himanshu's user avatar

Himanshu

31.2k30 gold badges110 silver badges132 bronze badges

asked Oct 14, 2009 at 10:22

sepang's user avatar

3

There is an easier way to get the exact version .NET version installed on your machine from a cmd prompt. Just follow the following instructions;

  1. Open the command prompt (i.e Windows + R → type «cmd»).

  2. Type the following command, all on one line:

    reg query "HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDP"
    

    (This will list all the .NET versions.)

  3. If you want to check the latest .NET 4 version.

  4. Type following instruction, on a single line:

    reg query "HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv4full" /v version
    

Please find the attached image below to see how it is shown.

Enter image description here

shA.t's user avatar

shA.t

16.4k5 gold badges53 silver badges111 bronze badges

answered Mar 3, 2016 at 13:43

AnandShanbhag's user avatar

AnandShanbhagAnandShanbhag

6,1491 gold badge18 silver badges19 bronze badges

9

Just type any one of the below commands to give you the latest version in the first line.

1. CSC
2. GACUTIL /l ?
3. CLRVER

You can only run these from the Visual Studio Command prompt if you have Visual Studio installed, or else if you have the .NET framework SDK, then the SDK Command prompt.

4. wmic product get description | findstr /C:".NET Framework"
5. dir /b /ad /o-n %systemroot%Microsoft.NETFrameworkv?.*

The last command (5) will list out all the versions (except 4.5) of .NET installed, latest first.
You need to run the 4th command to see if .NET 4.5 is installed.

Another three options from the PowerShell command prompt is given below.

6.   [environment]::Version
7.   $PSVersionTable.CLRVersion
8.   gci 'HKLM:SOFTWAREMicrosoftNET Framework SetupNDP' -recurse | gp -name Version,Release -EA 0 |
     where { $_.PSChildName -match '^(?!S)p{L}'} | select PSChildName, Version, Release

The last command (8) will give you all versions, including .NET 4.5.

Peter Mortensen's user avatar

answered Oct 14, 2009 at 10:25

Binoj Antony's user avatar

Binoj AntonyBinoj Antony

15.8k25 gold badges88 silver badges96 bronze badges

16

This answer is applicable to .NET Core only!

Typing dotnet --version in your terminal of choice will print out the version of the .NET Core SDK in use.

Learn more about the dotnet command here.

Tobias Tengler's user avatar

answered Jan 27, 2018 at 23:27

FelixAVeras's user avatar

FelixAVerasFelixAVeras

8449 silver badges17 bronze badges

2

Before going to a command prompt, please follow these steps…

Go to «C:/Windows/Microsoft.NET/Framework» → Inside this folder, there will be folder(s) like (all or any):

  • v1.0.3705
  • v2.0.50727
  • v3.5
  • v4.0.30319

Your latest .NET version would be in the highest v number folder, so if «v4.0.30319» is available that would hold your latest .NET framework. However, the «v4.0.30319» does not mean that you have the .NET framework version 4.0. The «v4.0.30319» is your Visual C# compiler version, therefore, in order to find the .NET framework version do the following.

Go to a command prompt and follow this path:

C:WindowsMicrosoft.NETFrameworkv4.0.30319 (or whatever the highest v number folder)

C:WindowsMicrosoft.NETFrameworkv4.0.30319 > csc.exe

Output:

Microsoft (R) Visual C# Compiler version 4.0.30319.17929
for Microsoft (R) .NET Framework 4.5
Copyright (C) Microsoft Corporation. All rights reserved.

Example below:

Enter image description here

Himanshu's user avatar

Himanshu

31.2k30 gold badges110 silver badges132 bronze badges

answered Jan 23, 2013 at 14:46

Sunimal Kaluarachchi's user avatar

3

.NET Version Detector is a GUI utility that displays which of the six(!) versions of the framework are installed.

Peter Mortensen's user avatar

answered Oct 14, 2009 at 10:32

Phil Devaney's user avatar

Phil DevaneyPhil Devaney

17.4k6 gold badges40 silver badges31 bronze badges

0

For the version of the framework that is installed, it varies depending on which service packs and hotfixes you have installed. Take a look at this MSDN page for more details. It suggests looking in %systemroot%Microsoft.NETFramework to get the version.

Environment.Version will programmatically give you the version of the CLR.

Note that this is the version of the CLR, and not necessarily the same as the latest version of the framework you have installed (.NET 3.0 and 3.5 both use v2 of the CLR).

Peter Mortensen's user avatar

answered Oct 14, 2009 at 10:26

adrianbanks's user avatar

adrianbanksadrianbanks

80.4k22 gold badges177 silver badges204 bronze badges

5

MSDN details it here very nicely on how to check it from registry:

To find .NET Framework versions by viewing the registry (.NET
Framework 1-4)

  1. On the Start menu, choose Run.
  2. In the Open box, enter regedit.exe.You must have administrative credentials to run regedit.exe.
  3. In the Registry Editor, open the following subkey:

    HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDP

The installed versions are listed under the NDP subkey. The version
number is stored in the Version entry. For the .NET Framework 4 the
Version entry is under the Client or Full subkey (under NDP), or under
both subkeys.

To find .NET Framework versions by viewing the registry (.NET
Framework 4.5 and later)

  1. On the Start menu, choose Run.
  2. In the Open box, enter regedit.exe. You must have administrative credentials to run regedit.exe.
  3. In the Registry Editor, open the following subkey:

    HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv4Full

Note that the path to the Full subkey includes the subkey Net
Framework rather than .NET Framework

Check for a DWORD value named Release. The existence of the Release
DWORD indicates that the .NET Framework 4.5 or newer has been
installed on that computer.

enter image description here

Note: The last row in the above snapshot which got clipped reads On all other OS versions: 461310. I tried my level best to avoid the information getting clipped while taking the screenshot but the table was way too big.

answered Dec 23, 2017 at 9:53

RBT's user avatar

RBTRBT

23k21 gold badges155 silver badges232 bronze badges

Just type the following in the command line:

dir /b /ad /o-n %systemroot%Microsoft.NETFrameworkv?.*

Your dotnet version will be shown as the highest number.

Dov Benyomin Sohacheski's user avatar

answered Sep 14, 2017 at 16:21

Steve Junior's user avatar

1

open cmd prompt type:

dotnet --info

Eric Aya's user avatar

Eric Aya

69.1k35 gold badges179 silver badges250 bronze badges

answered Aug 17, 2021 at 13:27

Trakehner1's user avatar

Trakehner1Trakehner1

811 silver badge2 bronze badges

2

If you open a command prompt and type the following two commands, all framework versions that are installed on the current machine will be listed (each one is stored in a separate directory within this directory).

cd %systemroot%Microsoft.NETFramework

dir /A:D

Peter Mortensen's user avatar

answered Oct 14, 2009 at 10:55

Michael Arnell's user avatar

Michael ArnellMichael Arnell

1,0081 gold badge9 silver badges16 bronze badges

1

If you do this fairly frequently (as I tend to do) you can create a shortcut on your desktop as follows:

  1. Right click on the desktop and select NewShortcut.
  2. In the location field, paste this string: powershell.exe -noexit -command "gci 'HKLM:SOFTWAREMicrosoftNET Framework SetupNDP' -recurse | gp -name Version,Release -EA 0 | where { $_.PSChildName -match '^(?!S)p{L}'} | select PSChildName, Version, Release" (this is from Binoj Antony’s post).
  3. Hit Next. Give the shortcut a name and Finish.

(NOTE: I am not sure if this works for 4.5, but I can confirm that it does work for 4.6, and versions prior to 4.5.)

Community's user avatar

answered May 3, 2016 at 22:57

kmote's user avatar

kmotekmote

15.9k11 gold badges66 silver badges89 bronze badges

1

My god, so much mess to find version of installed .net framework?

Windows > Search > Visual Studio Installer > for installed version of VS, tap on More > Modify > Individual Components and see it there:

enter image description here

halfer's user avatar

halfer

19.7k17 gold badges95 silver badges183 bronze badges

answered Jul 11, 2019 at 16:20

pixel's user avatar

pixelpixel

8,89416 gold badges72 silver badges135 bronze badges

1

To just get the installed version(s) at the command line, I recommend using net-version.

  • It’s just a single
    binary.
  • It uses the guidelines provided my
    Microsoft
    to get version information.
  • It doesn’t require the SDK to be installed.
  • Or the Visual Studio command prompt.
  • It doesn’t require you to use regedit and hunt down registry keys
    yourself. You can even pipe the output in a command line tool if
    you need to.

Source code is available on github.com

Full disclosure: I created this tool myself out of frustration.

answered Oct 27, 2015 at 21:09

Dan Esparza's user avatar

Dan EsparzaDan Esparza

27.8k28 gold badges101 silver badges126 bronze badges

2

Here is the Power Shell script which I used by taking the reference of:

https://stackoverflow.com/a/3495491/148657

$Lookup = @{
    378389 = [version]'4.5'
    378675 = [version]'4.5.1'
    378758 = [version]'4.5.1'
    379893 = [version]'4.5.2'
    393295 = [version]'4.6'
    393297 = [version]'4.6'
    394254 = [version]'4.6.1'
    394271 = [version]'4.6.1'
    394802 = [version]'4.6.2'
    394806 = [version]'4.6.2'
    460798 = [version]'4.7'
    460805 = [version]'4.7'
    461308 = [version]'4.7.1'
    461310 = [version]'4.7.1'
    461808 = [version]'4.7.2'
    461814 = [version]'4.7.2'
    528040 = [version]'4.8'
    528049 = [version]'4.8'
}

# For One True framework (latest .NET 4x), change the Where-Oject match 
# to PSChildName -eq "Full":
Get-ChildItem 'HKLM:SOFTWAREMicrosoftNET Framework SetupNDP' -Recurse |
  Get-ItemProperty -name Version, Release -EA 0 |
  Where-Object { $_.PSChildName -match '^(?!S)p{L}'} |
  Select-Object @{name = ".NET Framework"; expression = {$_.PSChildName}}, 
@{name = "Product"; expression = {$Lookup[$_.Release]}}, 
Version, Release

The above script makes use of the registry and gives us the Windows update number along with .Net Framework installed on a machine.

Reference: https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed#to-find-net-framework-versions-by-querying-the-registry-in-code-net-framework-45-and-later

Here are the results for the same when running that script on two different machines

  1. Where .NET 4.7.2 was already installed:

enter image description here

  1. Where .NET 4.7.2 was not installed:

enter image description here

answered Sep 25, 2019 at 18:16

Raghav's user avatar

RaghavRaghav

8,2466 gold badges78 silver badges104 bronze badges

It is exactly like java. Open up the terminal and execute following command

dotnet --version

Following is the screenshot of command executed

answered Aug 26, 2022 at 5:30

ahmad raza's user avatar

ahmad razaahmad raza

1111 silver badge2 bronze badges

1

Try .NET Checker by Scott Hanselman.

answered Jan 13, 2017 at 19:21

A.I's user avatar

A.IA.I

1,4381 gold badge15 silver badges18 bronze badges

1

clrver is an excellent one. Just execute it in the .NET prompt and it will list all available framework versions.

answered Jul 15, 2014 at 20:53

James Poulose's user avatar

James PouloseJames Poulose

3,3912 gold badges33 silver badges35 bronze badges

3

If you’r developing some .Net app (for ex. web app), you can make 1 line of error code (like invoke wrong function name) and reload your page, the .Net version will be showenter image description here

answered Apr 13, 2018 at 14:54

Sy C Dang's user avatar

1

For anyone running Windows 10 1607 and looking for .net 4.7.
Disregard all of the above.

It’s not in the Registry, C:WindowsMicrosoft.NET folder or the Installed Programs list or the WMIC display of that same list.

Look for «installed updates» KB3186568.

answered Oct 3, 2017 at 8:36

skrie's user avatar

skrieskrie

91 bronze badge

3

If you have installed visual studio on your machine,

Just go to Help > About Microsoft Visual Studio

You will see info about .NET version that IDE is using.

enter image description here

answered Sep 13, 2021 at 6:25

Paramjot Singh's user avatar

Run the following command on CMD:

  • dotnet —list-sdks

enter image description here

It will display all installed versions of .net, as seen in image above. You can also run the following command below to see the .net version that is in use:

  • dotnet —version

answered Dec 28, 2022 at 7:50

YongaJ's user avatar

YongaJYongaJ

1791 silver badge10 bronze badges

Понравилась статья? Поделить с друзьями:
  • Где посмотреть историю обновлений windows 10
  • Где посмотреть версию directx на windows 10
  • Где посмотреть историю буфера обмена windows 10
  • Где посмотреть версию bios на windows 10
  • Где посмотреть историю браузера на компьютере windows