Which net version windows

Проверка того, установлена ли платформа .NET How to check that .NET is already installed

Эта статья описывает, как проверить, какие версии среды выполнения .NET и пакета SDK установлены на компьютере. This article teaches you how to check which versions of the .NET runtime and SDK are installed on your computer. Если у вас есть интегрированная среда разработки, такая как Visual Studio или Visual Studio для Mac, то возможно, платформа .NET уже установлена. If you have an integrated development environment, such as Visual Studio or Visual Studio for Mac, .NET may have already been installed.

При установке пакета SDK устанавливается и соответствующая среда выполнения. Installing an SDK installs the corresponding runtime.

Если любая команда из этой статьи завершается ошибкой, среда выполнения или пакет SDK не установлены. If any command in this article fails, you don’t have the runtime or SDK installed. Дополнительные сведения см. в статьях, посвященных установке в Windows, macOS или Linux. For more information, see the install articles for Windows, macOS, or Linux.

Проверка версий пакета SDK Check SDK versions

Вы можете узнать, какие версии пакета SDK для .NET установлены, с помощью терминала. You can see which versions of the .NET SDK are currently installed with a terminal. Откройте терминал и выполните приведенную ниже команду. Open a terminal and run the following command.

Вы получите результат, аналогичный приведенному ниже. You get output similar to the following.

Проверка версий среды выполнения Check runtime versions

Вы можете узнать, какие версии среды выполнения .NET установлены, с помощью приведенной ниже команды. You can see which versions of the .NET runtime are currently installed with the following command.

Вы получите результат, аналогичный приведенному ниже. You get output similar to the following.

Проверка папок установки Check for install folders

Возможно, платформа .NET установлена, но не добавлена в переменную PATH для профиля операционной системы или пользователя. It’s possible that .NET is installed but not added to the PATH variable for your operating system or user profile. В данном случае команды из предыдущих разделов могут не работать. In this case, the commands from the previous sections may not work. В качестве альтернативы можно проверить существование папок установки .NET. As an alternative, you can check that the .NET install folders exist.

При установке с помощью установщика или сценария .NET устанавливается в стандартную папку. When you install .NET from an installer or script, it’s installed to a standard folder. В большинстве случаев установщик или сценарий, который вы используете для установки .NET, предоставляет возможность установки в другую папку. Much of the time the installer or script you’re using to install .NET gives you an option to install to a different folder. Если вы решили выполнить установить в другую папку, измените начало пути к папке. If you choose to install to a different folder, adjust the start of the folder path.

Исполняемый файл dotnet dotnet executable
C:\program files\dotnet\dotnet.exe C:\program files\dotnet\dotnet.exe

Пакет SDK для .NET .NET SDK
C:\program files\dotnet\sdk\<версия>\ C:\program files\dotnet\sdk\\

Среда выполнения .NET .NET Runtime
C:\program files\dotnet\shared\<тип среды выполнения>\<версия>\ C:\program files\dotnet\shared\\\

Исполняемый файл dotnet dotnet executable
/home/user/share/dotnet/dotnet /home/user/share/dotnet/dotnet

Пакет SDK для .NET .NET SDK
/home/user/share/dotnet/sdk// /home/user/share/dotnet/sdk//

Среда выполнения .NET .NET Runtime
/home/user/share/dotnet/shared/<тип среды выполнения>/<версия>/ /home/user/share/dotnet/shared///

Исполняемый файл dotnet dotnet executable
/usr/local/share/dotnet/dotnet /usr/local/share/dotnet/dotnet

Пакет SDK для .NET .NET SDK
/usr/local/share/dotnet/sdk/<версия>/ /usr/local/share/dotnet/sdk//

Среда выполнения .NET .NET Runtime
/usr/local/share/dotnet/shared/<тип среды выполнения>/<версия>/ /usr/local/share/dotnet/shared///

Дополнительные сведения More information

Версии пакета SDK и среды выполнения можно просмотреть с помощью команды dotnet —info . You can see both the SDK versions and runtime versions with the command dotnet —info . Вы также получите другие сведения о среде, такие как версия операционной системы и идентификатор среды выполнения (RID). You’ll also get other environmental related information, such as the operating system version and runtime identifier (RID).

How to Check which .NET Framework Versions are Installed in Windows 10

Users can install and run multiple versions of the .NET framework on their computer. If you are developing or deploying your application, you need to know which versions of the .NET Framework are installed on the user’s computer. The registry contains a list of the versions of the .NET Framework installed on a computer.

The .NET Framework consists of two main components that are available separately:

  1. A set of assemblies, which are collections of types and resources that provide functionality for your applications. The .NET Framework and the assemblies have the same version number. For example, versions 4.5, 4.6.1, and 4.7.2 of the .NET Framework.
  2. The Common Language Runtime (CLR) that manages and executes your application code. A single version of CLR usually supports multiple versions of the .NET Framework. For example, CLR version 4.0.30319.xxxxx, where xxxxx is less than 42000, supports versions 4 to 4.5.2 of the .NET Framework. CLR version 4.0.30319.42000 or higher supports versions of the .NET Framework that begin with the .NET Framework 4.6.

Using Windows Explorer

All versions of the Microsoft .NET Framework are installed in the following directory :

Where “%windir%” represents the “Windows” directory that exists on the system drive where Windows is installed in your system, e.g. C:\Windows.

So just enter the above path in the RUN dialog box or in the address bar of Windows Explorer and press Enter. This opens the directory as shown in the following screenshot:

In this directory you can find the installed versions.

Use the Registry Editor

Use the following registry information to determine which version(s) and service pack level(s) of the Microsoft .NET Framework are installed.

To do this, follow these steps:

April 2021 Update:

We now recommend using this tool for your error. Additionally, this tool fixes common computer errors, protects you against file loss, malware, hardware failures and optimizes your PC for maximum performance. You can fix your PC problems quickly and prevent others from happening with this software:

  • Step 1 : Download PC Repair & Optimizer Tool (Windows 10, 8, 7, XP, Vista – Microsoft Gold Certified).
  • Step 2 : Click “Start Scan” to find Windows registry issues that could be causing PC problems.
  • Step 3 : Click “Repair All” to fix all issues.

  • Click Start, type regedit in the Search for Programs and Files box (in Windows XP, click Run, then type regedit in the Run dialog box), and then press Enter.
  • In the Registry Editor, open the following subkey
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full
  • Note: If the complete subkey is not present, you have not installed the .NET Framework 4.5 or later.
  • Look for a DWORD value called Release. The presence of the Release DWORD value indicates that .NET Framework 4.5 or later is installed on this computer.
  • The Release DWORD value indicates which version of the .NET Framework is installed.

Using PowerShell to Detect .NET Versions

While it is possible to use Command Prompt or PowerShell to retrieve the versions of .NET on your computer, many methods found online produce incomplete results. As with our own tool, the best way to determine which versions of .NET are installed is to query the registry, and PowerShell can do this fairly easily.

The list of names is a bit unfriendly and you won’t get better information such as service pack numbers or minor revisions. Also, .NET 1 or 1.1 are not recognized because they are located in a different place in the registry than all other versions.

Another option is to download a ready-to-use PowerShell script that detects .NET versions and displays the information in a much more user-friendly way.

The Getter script for installed versions of the .NET Framework is hosted on Github and makes the information easier to read for most users. It currently supports and detects files from version 1.0 to the latest version of the .NET Framework 4.8.

CCNA, Web Developer, PC Troubleshooter

I am a computer enthusiast and a practicing IT Professional. I have years of experience behind me in computer programming, hardware troubleshooting and repair. I specialise in Web Development and Database Design. I also have a CCNA certification for Network Design and Troubleshooting.

Install .NET on Windows

In this article, you’ll learn how to install .NET on Windows. .NET is made up of the runtime and the SDK. The runtime is used to run a .NET app and may or may not be included with the app. The SDK is used to create .NET apps and libraries. The .NET runtime is always installed with the SDK.

The latest version of .NET is 5.0.

Supported releases

The following table is a list of currently supported .NET releases and the versions of Windows they’re supported on. These versions remain supported until either the version of .NET reaches end-of-support or the version of Windows reaches end-of-life.

Windows 10 versions end-of-service dates are segmented by edition. Only Home, Pro, Pro Education, and Pro for Workstations editions are considered in the following table. Check the Windows lifecycle fact sheet for specific details.

A + symbol represents the minimum version.

Operating System .NET Core 2.1 .NET Core 3.1 .NET 5
Windows 10 / Windows Server, Version 20H2 вњ”пёЏ вњ”пёЏ вњ”пёЏ
Windows 10 / Windows Server, Version 2004 вњ”пёЏ вњ”пёЏ вњ”пёЏ
Windows 10 / Windows Server, Version 1909 вњ”пёЏ вњ”пёЏ вњ”пёЏ
Windows 10 / Windows Server, Version 1903 вњ”пёЏ вњ”пёЏ вњ”пёЏ
Windows 10, Version 1809 вњ”пёЏ вњ”пёЏ вњ”пёЏ
Windows 10, Version 1803 вњ”пёЏ вњ”пёЏ вњ”пёЏ
Windows 10, Version 1709 вњ”пёЏ вњ”пёЏ вњ”пёЏ
Windows 10, Version 1607 вњ”пёЏ вњ”пёЏ вњ”пёЏ
Windows 8.1 вњ”пёЏ вњ”пёЏ вњ”пёЏ
Windows 7 SP1 ESU вњ”пёЏ вњ”пёЏ вњ”пёЏ
Windows Server 2019
Windows Server 2016
Windows Server 2012 R2
вњ”пёЏ вњ”пёЏ вњ”пёЏ
Windows Server Core 2012 R2 вњ”пёЏ вњ”пёЏ вњ”пёЏ
Nano Server, Version 1809+ вњ”пёЏ вњ”пёЏ вњ”пёЏ
Nano Server, Version 1803 вњ”пёЏ вњ”пёЏ вќЊ

Unsupported releases

The following versions of .NET are вќЊ no longer supported:

Runtime information

The runtime is used to run apps created with .NET. When an app author publishes an app, they can include the runtime with their app. If they don’t include the runtime, it’s up to the user to install the runtime.

There are three different runtimes you can install on Windows:

ASP.NET Core runtime
Runs ASP.NET Core apps. Includes the .NET runtime.

Desktop runtime
Runs .NET WPF and Windows Forms desktop apps for Windows. Includes the .NET runtime.

.NET runtime
This runtime is the simplest runtime and doesn’t include any other runtime. It’s highly recommended that you install both ASP.NET Core runtime and Desktop runtime for the best compatibility with .NET apps.

SDK information

The SDK is used to build and publish .NET apps and libraries. Installing the SDK includes all three runtimes: ASP.NET Core, Desktop, and .NET.

Dependencies

The following Windows versions are supported with .NET 5.0:

A + symbol represents the minimum version.

OS Version Architectures
Windows 10 Client Version 1607+ x64, x86, ARM64
Windows Client 7 SP1+, 8.1 x64, x86
Windows Server 2012 R2+ x64, x86
Windows Server Core 2012 R2+ x64, x86
Nano Server Version 1809+ x64

For more information about .NET 5.0 supported operating systems, distributions, and lifecycle policy, see .NET 5.0 Supported OS Versions.

The following Windows versions are supported with .NET Core 3.1:

A + symbol represents the minimum version.

OS Version Architectures
Windows Client 7 SP1+, 8.1 x64, x86
Windows 10 Client Version 1607+ x64, x86
Windows Server 2012 R2+ x64, x86
Nano Server Version 1803+ x64, ARM32

For more information about .NET Core 3.1 supported operating systems, distributions, and lifecycle policy, see .NET Core 3.1 Supported OS Versions.

.NET Core 3.0 is currently вќЊ out of support. For more information, see the .NET Core Support Policy.

The following Windows versions are supported with .NET Core 3.0:

A + symbol represents the minimum version.

OS Version Architectures
Windows Client 7 SP1+, 8.1 x64, x86
Windows 10 Client Version 1607+ x64, x86
Windows Server 2012 R2+ x64, x86
Nano Server Version 1803+ x64, ARM32

For more information about .NET Core 3.0 supported operating systems, distributions, and lifecycle policy, see .NET Core 3.0 Supported OS Versions.

.NET Core 2.2 is currently вќЊ out of support. For more information, see the .NET Core Support Policy.

The following Windows versions are supported with .NET Core 2.2:

A + symbol represents the minimum version.

OS Version Architectures
Windows Client 7 SP1+, 8.1 x64, x86
Windows 10 Client Version 1607+ x64, x86
Windows Server 2008 R2 SP1+ x64, x86
Nano Server Version 1803+ x64, ARM32

For more information about .NET Core 2.2 supported operating systems, distributions, and lifecycle policy, see .NET Core 2.2 Supported OS Versions.

The following Windows versions are supported with .NET Core 2.1:

A + symbol represents the minimum version.

OS Version Architectures
Windows Client 7 SP1+, 8.1 x64, x86
Windows 10 Client Version 1607+ x64, x86
Windows Server 2008 R2 SP1+ x64, x86
Nano Server Version 1803+ x64,

For more information about .NET Core 2.1 supported operating systems, distributions, and lifecycle policy, see .NET Core 2.1 Supported OS Versions.

Offline install for Windows 7

When doing an offline install for .NET Core 2.1 on Windows 7, you’ll first need to make sure that the latest Microsoft Root Certificate Authority 2011 has been installed on the target machine.

The certmgr.exe tool can automate installing a certificate and is obtained from Visual Studio or the Windows SDK. The following command is used to install the certificate before running the .NET Core 2.1 installer:

Be sure to review the dependencies required for Windows 7 below.

Windows 7 / Vista / 8.1 / Server 2008 R2 / Server 2012 R2

More dependencies are required if you’re installing the .NET SDK or runtime on the following Windows versions:

Operating System Prerequisites
Windows 7 SP1 ESU — Microsoft Visual C++ 2015-2019 Redistributable 64-bit / 32-bit
— KB3063858 64-bit / 32-bit
— Microsoft Root Certificate Authority 2011 (.NET Core 2.1 offline installer only)
Windows Vista SP 2 Microsoft Visual C++ 2015-2019 Redistributable 64-bit / 32-bit
Windows 8.1 Microsoft Visual C++ 2015-2019 Redistributable 64-bit / 32-bit
Windows Server 2008 R2 Microsoft Visual C++ 2015-2019 Redistributable 64-bit / 32-bit
Windows Server 2012 R2 Microsoft Visual C++ 2015-2019 Redistributable 64-bit / 32-bit

The previous requirements are also required if you receive an error related to either of the following dlls:

Install with PowerShell automation

The dotnet-install scripts are used for CI automation and non-admin installs of the runtime. You can download the script from the dotnet-install script reference page.

The script defaults to installing the latest long term support (LTS) version, which is .NET Core 3.1. You can choose a specific release by specifying the Channel switch. Include the Runtime switch to install a runtime. Otherwise, the script installs the SDK.

Install the SDK by omitting the -Runtime switch. The -Channel switch is set in this example to Current , which installs the latest supported version.

Install with Visual Studio

If you’re using Visual Studio to develop .NET apps, the following table describes the minimum required version of Visual Studio based on the target .NET SDK version.

.NET SDK version Visual Studio version
5.0 Visual Studio 2019 version 16.8 or higher.
3.1 Visual Studio 2019 version 16.4 or higher.
3.0 Visual Studio 2019 version 16.3 or higher.
2.2 Visual Studio 2017 version 15.9 or higher.
2.1 Visual Studio 2017 version 15.7 or higher.

If you already have Visual Studio installed, you can check your version with the following steps.

  1. Open Visual Studio.
  2. Select Help >About Microsoft Visual Studio.
  3. Read the version number from the About dialog.

Visual Studio can install the latest .NET SDK and runtime.

Select a workload

When installing or modifying Visual Studio, select one or more of the following workloads, depending on the kind of application you’re building:

  • The .NET Core cross-platform development workload in the Other Toolsets section.
  • The ASP.NET and web development workload in the Web & Cloud section.
  • The Azure development workload in the Web & Cloud section.
  • The .NET desktop development workload in the Desktop & Mobile section.

Install alongside Visual Studio Code

Visual Studio Code is a powerful and lightweight source code editor that runs on your desktop. Visual Studio Code is available for Windows, macOS, and Linux.

While Visual Studio Code doesn’t come with an automated .NET Core installer like Visual Studio does, adding .NET Core support is simple.

Windows Installer

The download page for .NET provides Windows Installer executables.

When you use the Windows installers to install .NET, you can customize the installation path by setting the DOTNETHOME_X64 and DOTNETHOME_X86 parameters:

If you want to install .NET silently, such as in a production environment or to support continuous integration, use the following switches:

/install
Installs .NET.

/quiet
Prevents any UI and prompts from displaying.

norestart
Suppresses any attempts to restart.

The installer returns an exit code of 0 for success and an exit code of 3010 to indicate that a restart is required. Any other value is generally an error code.

Download and manually install

As an alternative to the Windows installers for .NET, you can download and manually install the SDK or runtime. Manual install is usually done as part of continuous integration testing. For a developer or user, it’s generally better to use an installer.

Both .NET SDK and .NET Runtime can be manually installed after they’ve been downloaded. If you install .NET SDK, you don’t need to install the corresponding runtime. First, download a binary release for either the SDK or the runtime from one of the following sites:

Create a directory to extract .NET to, for example %USERPROFILE%\dotnet . Then, extract the downloaded zip file into that directory.

By default, .NET CLI commands and apps won’t use .NET installed in this way and you must explicitly choose to use it. To do so, change the environment variables with which an application is started:

This approach lets you install multiple versions into separate locations, then explicitly choose which install location an application should use by running the application with environment variables pointing at that location.

When DOTNET_MULTILEVEL_LOOKUP is set to 0 , .NET ignores any globally installed .NET version. Remove that environment setting to let .NET consider the default global install location when selecting the best framework for running the application. The default is typically C:\Program Files\dotnet , which is where the installers install .NET.

Docker

Containers provide a lightweight way to isolate your application from the rest of the host system. Containers on the same machine share just the kernel and use resources given to your application.

.NET can run in a Docker container. Official .NET Docker images are published to the Microsoft Container Registry (MCR) and are discoverable at the Microsoft .NET Docker Hub repository. Each repository contains images for different combinations of the .NET (SDK or Runtime) and OS that you can use.

Microsoft provides images that are tailored for specific scenarios. For example, the ASP.NET Core repository provides images that are built for running ASP.NET Core apps in production.

For more information about using .NET in a Docker container, see Introduction to .NET and Docker and Samples.

Читайте также:  Windows 10 параметры адаптера как зайти
Оцените статью