Visual studio как изменить версию net framework

This article shows how to change the .NET Framework version

Background:

This article shows how to change the .NET Framework version.

Steps to Complete:

1. In your Solution Explorer, right-click your project and select Properties

2. In Properties, go to the Application option on the side menu

3. Locate the Target framework dropdown and select the framework version you need

Tags:

Общие сведения о настройке целевой платформы

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

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

Вы также можете нацеливать приложения на различные платформы. Дополнительные сведения см. в разделе Настройка для различных версий.

Функции нацеливания на платформу

Среди прочего, доступны следующие возможности нацеливания на платформу:

При открытии проекта, который ориентирован на более раннюю версию платформы, Visual Studio может автоматически обновить его или оставить имеющуюся настройку.

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

В каждом из нескольких проектов в одном решении можно ориентироваться на разные версии .NET.

Можно изменить версию .NET, на которую ориентирован существующий проект.

При изменении версии платформы .NET, на которую сориентирован проект, Visual Studio вносит все необходимые изменения в ссылки и файлы конфигурации.

При работе над проектом, ориентированным на более раннюю версию платформы, Visual Studio динамически изменяет среду разработки, как показано ниже:

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

Фильтрует пользовательские элементы управления на панели элементов, удаляя те, что недоступны в целевой версии, и показывая только наиболее актуальные элементы управления, если их доступно несколько.

Фильтрует IntelliSense, чтобы пропустить языковые функции, которые недоступны в целевой версии.

Фильтрует свойства в окне Свойства, чтобы пропустить те, которые недоступны в целевой версии.

Фильтрует пункты меню, чтобы пропустить те, которые недоступны в целевой версии.

Для сборок система использует версию и параметры компилятора, которые подходят для целевой версии.

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

Выбор целевой версии платформы

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

Framework dropdown in VS 2019

Если вы решите создать проект .NET Framework, то увидите интерфейс, похожий на тот, которой показан на снимке экрана:

Screenshot of the Framework drop-down list in Visual Studio 2022.

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

На первом экране вы увидите диалоговое окно Настройка нового проекта.

Screenshot of the

На втором экране появится диалоговое окно Дополнительные параметры.

Screenshot of the

Изменение требуемой версии .NET Framework

Для существующего проекта Visual Basic, C# или F# вы можете изменить целевую версию .NET в диалоговом окне свойств проекта. Сведения об изменении целевой версии для проектов C++ см. в статье How to: Modify the Target Framework and Platform Toolset (Практическое руководство. Изменение требуемой версии .NET Framework и набора средств платформы).

В обозревателе решений правой кнопкой мыши откройте контекстное меню проекта, в который необходимо внести изменения, и выберите Свойства.

В левом столбце окна Свойства перейдите на вкладку Приложение.

Project properties Application tab

После создания приложения UWP невозможно изменить целевую версию Windows или .NET.

В списке Целевая рабочая среда выберите требуемую версию.

В открывшемся диалоговом окне проверки нажмите кнопку Да.

Проект будет выгружен. При его перезагрузке он будет ориентирован на выбранную версию .NET.

В обозревателе решений правой кнопкой мыши откройте контекстное меню проекта, в который необходимо внести изменения, и выберите Свойства.

В левом столбце окна Свойства перейдите на вкладку Приложение.

После создания приложения UWP невозможно изменить целевую версию Windows или .NET.

В списке Целевая рабочая среда выберите требуемую версию.

Для проекта .NET Framework будет показано диалоговое окно, похожее на то, которое изображено на снимке экрана:

Screenshot of the Project Properties dialog with .NET Framework options highlighted.

Для проекта .NET будет показано диалоговое окно, похожее на то, которое изображено на снимке экрана:

Screenshot of the General tab in the Project Properties dialog box, with the

Если появится диалоговое окно проверки, нажмите кнопку Да.

Проект будет выгружен. При его перезагрузке он будет ориентирован на выбранную версию .NET.

Если код содержит ссылки на другую версию .NET, отличную от целевой, при компиляции и запуске кода могут появиться сообщения об ошибках. Чтобы устранить эти ошибки, измените ссылки. См. раздел Устранение неполадок, связанных с настройкой для определенных версий платформы .NET.

В зависимости от целевой платформы ее можно представить в файле проекта следующим образом:

  • Для приложения .NET Core: <TargetFramework>netcoreapp2.1</TargetFramework>
  • Для приложения .NET Standard: <TargetFramework>netstandard2.0</TargetFramework>
  • Для приложения .NET Framework: <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>

Разрешение системных ссылок и пользовательских ссылок на сборки

Чтобы нацелиться на определенную версию .NET, нужно сначала установить подходящие ссылки на сборки. Вы можете скачать пакеты разработчика для разных версий .NET на странице скачиваемых материалов .NET.

Для проектов .NET Framework диалоговое окно Добавить ссылку позволяет отключить системные сборки, не относящиеся к целевой версии платформы .NET Framework, чтобы их невозможно было добавить в проект случайно. (Системные сборки — это файлы DLL, включенные в версию платформы .NET Framework.) Ссылки, относящиеся к версии платформы, которая старше целевой версии, не будут разрешены, а зависящие от них элементы управления невозможно будет добавить. Если вы хотите активировать такую ссылку, измените целевую версию платформы .NET Framework для проекта на ту, которая содержит эту ссылку.

Дополнительные сведения о ссылках на сборки см. в разделе Разрешение сборок во время разработки.

Visual Studio 2019 — измените целевую платформу .NET на 4.8

Я не могу изменить .NET-версию своего проекта. Я установил .NET 4.8 через установщик Visual Studio и вручную загрузил его отдельно. Ни одна из этих работ.

Я действительно пытался изменить структуру в файле проекта .csproj

и это тоже не работает . У меня заканчиваются решения, и я действительно не знаю, что делать дальше.

целевая рамка рис.

Если вы пытаетесь преобразовать проект «net5.0-windows» в стиле SDK в проект WinForms «net48», вам, вероятно, придется сделать больше, чем просто изменить TargetFramework .

Во-первых, Project узел в начале файла «.csproj» должен выглядеть так:

(Цели «net5.0» это не нужно .WindowsDesktop .)

Во-вторых, вам нужно убедиться, что <UseWindowsForms>true</UseWindowsForms> это часть main PropertyGroup .

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

Практическое руководство. настройку целевых платформ в проектах

Visual Studio позволяет настраивать сборки приложения для различных платформ, включая 64-разрядные платформы. Дополнительные сведения о поддержке 64-разрядных платформ в Visual Studio см. в статье 64-разрядные приложения.

Visual Studio 2022 выполняется как 64-разрядное приложение. Она совершенно отделена от платформ, которые можно выбрать для проектов в Visual Studio. Вы можете использовать любую версию Visual Studio, предназначенную для 32-разрядных и 64-разрядных платформ.

Visual Studio выполняется как 32-разрядное приложение. Она совершенно отделена от платформ, которые можно выбрать для проектов в Visual Studio. Вы можете использовать любую версию Visual Studio, предназначенную для 32-разрядных и 64-разрядных платформ.

Нацеливание на платформы с помощью диспетчера конфигураций

Диспетчер конфигураций позволяет быстро добавить новую платформу для нацеливания проекта. Если выбрать одну из платформ, входящих в Visual Studio, свойства проекта изменяются для сборки проекта в соответствии с выбранной платформой.

Настройка проекта для 64-разрядной платформы

В строке меню последовательно выберите пункты Сборка>Диспетчер конфигураций.

В списке Активная платформа решения выберите 64-разрядную платформу для нацеливания решения, а затем нажмите кнопку Закрыть.

Если нужная платформа не отображается в списке Активная платформа решения, выберите Создать.

Откроется диалоговое окно Создание платформы решения.

В списке Введите или выберите новую платформу выберите x64.

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

Если требуется скопировать параметры из текущий конфигурации платформы, выберите ее и нажмите кнопку ОК.

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

Имя платформы Win32 используется для проектов C++ и соответствует x86. Visual Studio поддерживает платформы уровня проекта и платформы уровня решения. При этом платформы проекта основаны на системах проектов для разных языков. Проекты C++ используют Win32 и x64, а платформы решения — x86 и x64. Когда вы выбираете x86 в качестве конфигурации решения, Visual Studio выбирает для проектов C++ платформу Win32. Чтобы просмотреть параметры платформы уровня проекта и платформы уровня решения, откройте Configuration Manager и обратите внимание на два параметра платформы. Платформа уровня решения отображается в раскрывающемся списке Активная платформа решения, а платформа уровня проекта показана в таблице для каждого проекта. Screenshot showing solution platform and project platform

Нацеливание на платформы в конструкторе проектов

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

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

Для проектов Visual Basic см. раздел /platform (Visual Basic).

Для проектов C++/CLI см. статью /clr (компиляция CLR).

Изменение файла проекта вручную

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

Пример. Ссылки на сборки x86 и x64 и библиотеки DLL

У вас может быть сборка .NET или библиотека DLL с версиями x86 и x64. Чтобы настроить проект для использования этих ссылок, сначала добавьте ссылку, а затем откройте файл проекта и измените его, чтобы добавить ItemGroup с условием, которое ссылается как на конфигурацию, так и на целевую платформу. Например, предположим, что вы ссылаетесь на двоичный файл ClassLibrary1, и существуют разные пути для конфигураций отладки и выпуска, а также версии x86 и x64. Используйте четыре элемента ItemGroup со всеми сочетаниями параметров, как показано далее:

Дополнительные сведения о файле проекта см. в статье Справочные сведения о схеме файлов проектов MSBuild.


.Net framework is a powerful software development framework developed by Microsoft for building, deploying, and running applications in windows machine.Net developer uses .Net framework for developing desktop and web applications. But this framework sometimes may problem for you. You might face the situation like you are developing a web application using the latest version of the .net framework. Let’s say .net framework 4.8 and at the time of deploying the server does not have .net framework 4.8. Then you have two options:

1. Downgrade .net framework in application from visual studio

2.  Install .net framework 4.8 on the server or downgrade to lower version so that server has that version already installed. Upgrading .net framework sometimes create some issues like some .net framework application which is already in the server might not work correctly.

From Microsoft Website

Talking especially about 4.x ( 4.0 to 4.8)

1 . If you have installed the latest version of the .net framework, then you do not have to uninstall the previous version.

2. If your OS or server has been preinstalled with a particular .Net framework version, then you cannot install the older version on the same machine.

3. If you have a newer version, you cannot install the previous .net framework version.

4. Only one 4.x version will exist in your system and is backward compatible.

5. If you like the older version then first remove the newer version and then install an older version

So, you may be liking to downgrade the .net framework, so in this tutorial, I will guide you for the same.

Downgrade .net application Version

It’s quite interesting to see that the project works just fine locally. And it’s is time to upload to the server. You have uploaded successfully. But you try to access the site in the browser you may get NuGet package compatibility-related issues. And this may irritate you. Sometimes it may take a day to solve the problem.

Microsoft usually upgrades DLL files for bug fixing, improving performances, resolving security-related issues, etc.

A solution to all the problems like:

  • VS 2019 downgrades .NET 4.7 projects to target framework version 4.6.1.
  • How to downgrade the target framework from 4.5 to 4.0?
  • How to downgrade the target framework from 4.7.2 to 4.5.2?
  • Downgrading .NET Framework causing  packages related issues
  • Downgrade Net Framework 4.8 to 4.7.03

can be solved by following below step by step.

There are two ways of solving this issue.

  1. Downgrade your application to the required .net framework that the IIS server is asking.
  2. Upgrade IIS Server to the version that your application is asking.

Doing Step 2 is beyond the scope of this tutorial. Here, I followed step 1.

Downgrade .net application (Project Level)

1) Open your project in a visual studio

First, open your project in a visual studio. 

2) Check the .net framework installed in your application.

  • Right-click on your project file (not a solution) 
  • Click on «Properties«.
  • Then under the «Application» tabs look at the «Target Framework» dropdown section.
  • Here, we can see this project is running at the 4.7.2 .net framework version.

Also, you will find all the package installed is targeting the 4.7.2 .net framework as shown below.

  • Open packages.config file.

packages.config looks like this:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Antlr" version="3.5.0.2" targetFramework="net472" />
  <package id="bootstrap" version="3.4.1" targetFramework="net472" />
  <package id="elmah" version="1.2.2" targetFramework="net472" />
  <package id="elmah.corelibrary" version="1.2.2" targetFramework="net472" />
  <package id="Elmah.Mvc" version="2.1.2" targetFramework="net472" />
  <package id="EntityFramework" version="6.3.0" targetFramework="net472" />
  <package id="EntityFramework6.Npgsql" version="6.3.0" targetFramework="net472" />
  <package id="EPPlus" version="5.1.2" targetFramework="net472" />
  <package id="jQuery" version="3.3.1" targetFramework="net472" />

---
</packages>

3) Change the current.net framework to the required .net framework

Here, I am having a 4.7.2 .net framework and I am targeting the .net framework to 4.5.2  as shown below.

Then you may get a warning message as shown below.

 
 Warning: Some NuGet packages were installed using a target framework different from the current target framework and may need to be 
reinstalled. Visit https://docs.nuget.org/docs/workflows/reinstalling-packages for more information. Packages affected:
Microsoft.CodeDom.Providers.DotNetCompilerPlatform
DowngradeApplication

4)Update the NuGet package using the NuGet package console.

  • Tool > Nuget Package Manager > Package Manager Console   and type below command

💡 Note! You must have NuGet version 2.1 for using the package manager console. For version less than Nuget version 2.1 visit here. 👉

5) Check the .net framework installed in a package.config file.

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Antlr" version="3.5.0.2" targetFramework="net452" />
  <package id="bootstrap" version="3.4.1" targetFramework="net452" />
  <package id="elmah" version="1.2.2" targetFramework="net472" />
  <package id="elmah.corelibrary" version="1.2.2" targetFramework="net452" />
  <package id="Elmah.Mvc" version="2.1.2" targetFramework="net452" />
  <package id="EntityFramework" version="6.3.0" targetFramework="net452" />
  <package id="EntityFramework6.Npgsql" version="6.3.0" targetFramework="net452" />
  <package id="EPPlus" version="5.1.2" targetFramework="net452" />
  <package id="jQuery" version="3.3.1" targetFramework="net452" />

---
</packages>

Now, our application is targeting to 4.5.2 .net framework.

So, finally, we have successfully downgraded the .net framework.

Note: If you have multiple projects in a solution then repeat the same steps as above for all projects.

Downgrade .net framework for NuGet version < 2.1 (Project Level)

If you have a NuGet version less than 2.1 then the above method doesn’t work. Follow the below steps:

NuGet 2.0 and less doesn’t deal very well with re-targeting your applications. To change the target frameworks of your packages, you will need to uninstall each package and reinstall all those packages again.

Note:

While downgrading the .net framework for the project, some errors may occur at a compiled time and can’t reference the namespace. So, some packages and libraries may not work if you downgrade so read the documentation properly and if all of your packages support on lower .net version then Ok and move forward for the process.

Downgrade .net framework in Computer (OS level)

There are many questions where people are asking how to downgrade the .net framework installed on the computer. Even the general users can do it. You don’t have to mess with the registry. I will write about this in the next article.

Conclusion

It seems that it can be simple to downgrade a project, but it takes a long time to find a solution. Thanks, visual studio for such wonderful tools.

FAQ:

What .net framework comes with Windows Server 2016?

Ans: It comes with .Net framework 4.7 and all the lower and same versions of the .net application work fluently.

title description ms.date helpviewer_keywords ms.assetid

Install the .NET Framework developer pack or redistributable

Developers can download and install the .NET Framework developer pack and targeting pack. You can include the .NET Framework redistributable with your apps.

02/23/2022

.NET Framework redistributable package, downloading

.NET Framework, installing

installing .NET Framework

installation [.NET Framework]

daf9d9d5-84ac-4bd9-a864-27665ffd0f5c

Install .NET Framework for developers

.NET is an integral part of many apps running on Windows and provides common functionality for those apps to run. For developers, .NET Framework provides a comprehensive and consistent programming model for building apps that have visually stunning user experiences and seamless and secure communication.

[!NOTE]
This article is intended for developers who either want to install .NET Framework on their own system or who want to install it with their applications. For users interested in installing .NET Framework, see the individual articles that discuss installing .NET Framework on specific operating systems, such as Install .NET Framework on Windows 10 and Windows Server 2016.

This article provides links for installing all versions of .NET Framework from .NET Framework 4.5 to .NET Framework 4.8.1 on your computer. If you’re a developer, you can also use these links to download and redistribute .NET Framework with your apps. For information on deploying a version of .NET Framework with your app, see .NET Framework deployment guide for developers.

[!INCLUDEnet_retirement]

[!INCLUDEnet-framework-4-versions]

For more information about versions of .NET Framework and how to determine which versions are installed on a computer, see Versions and Dependencies and How to: Determine Which .NET Framework Versions Are Installed.

[!NOTE]
For information on .NET Framework 3.5, see Install the .NET Framework 3.5 on Windows 11, Windows 10, Windows 8.1, and Windows 8.

Use the following table for quick links, or read further for details. To view the system requirements for .NET Framework before installation, see System Requirements. For help with troubleshooting, see Troubleshooting.

.NET Framework version Installer (Developer Pack and Runtime) Platform support
4.8.1 .NET Framework 4.8.1 Included in:

Visual Studio 2022 (version 17.3)

You can install on:

Windows 11
Windows 10 version 21H2
Windows 10 version 21H1
Windows 10 version 20H2
Windows Server 2022

(for a full list, see system requirements)

4.8 .NET Framework 4.8 Included in:

Windows 11
Windows 10 May 2019 Update (and later versions)
Visual Studio 2019 (version 16.3)

You can install on:

Windows 10 October 2018 Update
Windows 10 April 2018 Update
Windows 10 Fall Creators Update
Windows 10 Creators Update
Windows 10 Anniversary Update
Windows 8.1 and earlier
Windows Server 2022
Windows Server 2019
Windows Server, Version 1809
Windows Server, Version 1803

(for a full list, see system requirements)

4.7.2 .NET Framework 4.7.2 Included in:

Windows 10 October 2018 Update
Windows 10 April 2018 Update
Windows Server 2019
Windows Server, Version 1809
Windows Server, Version 1803
Visual Studio 2017 (15.8 update)

You can install on:

Windows 10 Fall Creators Update
Windows 10 Creators Update
Windows 10 Anniversary Update
Windows 8.1 and earlier
Windows Server, version 1709 and earlier

(for a full list, see system requirements)

4.7.1 .NET Framework 4.7.1 Included in:

Windows 10 Fall Creators Update
Windows Server, version 1709
Visual Studio 2017 (15.5 update)

You can install on:

Windows 10 Creators Update
Windows 10 Anniversary Update
Windows 8.1 and earlier
Windows Server 2016 and earlier
(for a full list, see system requirements)

4.7 .NET Framework 4.7 Included in:

Windows 10 Creators Update
Visual Studio 2017 (15.3 update)

You can install on:

Windows 10 Anniversary Update
Windows 8.1 and earlier
Windows Server 2016 and earlier
(for a full list, see system requirements)

4.6.2 .NET Framework 4.6.2 Included in:

Windows 10 Anniversary Update

You can install on:

Windows 10 November Update
Windows 10
Windows 8.1 and earlier
Windows Server 2012 R2 and earlier
(for a full list, see system requirements)

4.6.1 .NET Framework 4.6.1 Included in:

Visual Studio 2015 Update 2

You can install on:

Windows 10
Windows 8.1 and earlier
Windows Server 2012 R2 and earlier
(for a full list, see system requirements)

4.6 .NET Framework 4.6 Included in:

Windows 10
Visual Studio 2015

You can install on:

Windows 8.1 and earlier
Windows Server 2012 R2 and earlier
(for a full list, see system requirements)

4.5.2 .NET Framework 4.5.2 You can install on:

Windows 8.1 and earlier
Windows Server 2012 R2 and earlier
(for a full list, see system requirements)

4.5.1 .NET Framework 4.5.1 Included in:

Windows 8.1
Windows Server 2012 R2
Visual Studio 2013

You can install on:

Windows 8 and earlier
Windows Server 2012 and earlier
(for a full list, see system requirements)

4.5 .NET Framework 4.5 Included in:

Windows 8
Windows Server 2012
Visual Studio 2012

You can install on:

Windows 7 and earlier
Windows Server 2008 SP2 and earlier
(for a full list, see system requirements)

[!INCLUDE net-framework-vs]

You can install the Developer Pack for a specific version of the .NET Framework, if one is available, on all supported platforms.

Developer Packs only target a specific version of .NET Framework and don’t include previous versions. For example, the .NET Framework 4.8 Developer Pack doesn’t include .NET Framework 4.7.

You can install the Web or Offline installer on:

  • Windows 8.1 and earlier

  • Windows Server 2012 R2 and earlier

For a full list, see System Requirements.

For a general introduction to .NET Framework for both users and developers, see Getting Started. For information about deploying .NET Framework with your app, see the deployment guide. To read about the architecture and key features of .NET Framework, see the overview.

Installation choices

Install a developer targeting pack to develop against the most recent version of .NET Framework in Visual Studio or another development environment, or download the .NET Framework redistributable for distribution with your app or control.

To install the .NET Framework Developer Pack or Targeting Pack

A targeting pack lets your app target a specific version of .NET Framework when developing in Visual Studio and some other development environments. A developer pack includes a specific version of .NET Framework and its accompanying SDK along with its corresponding targeting pack.

The developer pack for .NET Framework 4.5.1 or 4.5.2, the targeting pack for .NET Framework 4.6, and the developer pack for .NET Framework 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, or 4.8 provides a particular .NET Framework’s version of the reference assemblies, language packs, and IntelliSense files for use in an integrated development environment such as Visual Studio. If you’re using Visual Studio, the developer pack or targeting pack also adds the installed version of .NET Framework to the target choices when you create a new project. Choose one of the following:

  • .NET Framework 4.8.1
  • .NET Framework 4.8
  • .NET Framework 4.7.2
  • .NET Framework 4.7.1
  • .NET Framework 4.7
  • .NET Framework 4.6.2
  • .NET Framework 4.6.1
  • .NET Framework 4.6
  • .NET Framework 4.5.2 to install version 4.5.2 on Windows 8.1 or earlier, Visual Studio 2013, Visual Studio 2012, or other IDEs.
  • .NET Framework 4.5.1 to install version 4.5.1 on Visual Studio 2012 or other IDEs.

From the developer pack download page, choose Download. Next, choose Run or Save, and follow the instructions when prompted. You can also install the developer pack or targeting pack for a specific version of .NET Framework by selecting it from the optional components in the .NET desktop development workload in the Visual Studio Installer, as the following figure shows.

:::image type=»content» source=»media/guide-for-developers/visual-studio-framework.png» alt-text=»Visual Studio installer with .NET Framework options selected.» lightbox=»media/guide-for-developers/visual-studio-framework-large.png»:::

When you target a particular version of .NET Framework, your application is built by using the reference assemblies that are included with that version’s developer pack. At run time, assemblies are resolved from the Global Assembly Cache, and the reference assemblies are not used.

When building an application from Visual Studio or using MSBuild from the command line, MSBuild may display error MSB3644, «The reference assemblies for framework «framework-version» were not found.» To address the error, download the developer pack or the targeting pack for that version of .NET Framework.

To install or download the .NET Framework redistributable

Installers download .NET Framework components for an app or control that targets those versions of .NET Framework. These components must be installed on each computer where the app or control runs. These installers are redistributable, so you can include them in the setup program for your app.

The download page is provided in several languages, but most of the downloads are provided in English only. For additional language support, you must install a language pack.

Two types of redistributable installers are available:

  • Web installer (web bootstrapper) downloads the required components and the language pack that matches the operating system of the installation computer from the web. This package is much smaller than the offline installer but requires a consistent Internet connection. You can download the standalone language packs to install additional language support.

  • Offline installer (standalone redistributable) contains all the required components for installing .NET Framework but doesn’t contain language packs. This download is larger than the web installer. The offline installer doesn’t require an internet connection. After you run the offline installer, you can download the standalone language packs to install language support. Use the offline installer if you can’t rely on having a consistent Internet connection.

Both web and offline installers are designed for x86-based and x64-based computers (see system requirements), but do not support Itanium-based computers.

  1. Open the download page for the .NET Framework version you want to install:

    • .NET Framework 4.8.1
    • .NET Framework 4.8
    • .NET Framework 4.7.2
    • .NET Framework 4.7.1
    • .NET Framework 4.7
    • .NET Framework 4.6.2
    • .NET Framework 4.6.1
    • .NET Framework 4.6
    • .NET Framework 4.5.2
    • .NET Framework 4.5.1
    • .NET Framework 4.5
  2. Select the language for the download page. This option does not download the localized resources of .NET Framework; it only affects the text displayed on the download page.

  3. Choose Download.

  4. If prompted, select the download that matches your system architecture, and then choose Next.

  5. When the download prompt appears, do one of the following:

    • If you want to install .NET Framework on your computer, choose Run, and then follow the prompts on your screen.

    • If you want to download .NET Framework for redistribution, choose Save, and then follow the prompts on your screen.

  6. If you want to download resources for additional languages, follow the instructions in the next section to install one or more language packs.

[!NOTE]
If you encounter any problems during the installation, see Troubleshooting.

Installation notes:

  • .NET Framework 4.5 and later versions replace .NET Framework 4.0. When you install these versions on a system that has .NET Framework 4 installed, the assemblies are replaced.

  • Uninstalling .NET Framework 4.5 or later versions also removes pre-existing .NET Framework 4 files. If you want to go back to .NET Framework 4, you must reinstall it and any updates to it. See Installing the .NET Framework 4.

  • You must have administrative credentials to install .NET Framework 4.5 or later versions.

  • The .NET Framework 4.5 redistributable was updated on October 9, 2012 to correct an issue related to an improper timestamp on a digital certificate, which caused the digital signature on files produced and signed by Microsoft to expire prematurely. If you previously installed the .NET Framework 4.5 redistributable package dated August 16, 2012, we recommend that you update your copy with the latest redistributable from the .NET Framework download page. For more information about this issue, see Microsoft Security Advisory 2749655.

To install language packs

Language packs are executable files that contain the localized resources (such as translated error messages and UI text) for supported languages. If you don’t install a language pack, .NET Framework error messages and other text are displayed in English. Note that the web installer automatically installs the language pack that matches your operating system, but you can download additional language packs to your computer. The offline installers don’t include any language packs.

[!IMPORTANT]
The language packs don’t contain the .NET Framework components that are required to run an app, so you must run the web or offline installer before you install a language pack. If you have already installed a language pack, uninstall it, install the .NET Framework, and then reinstall the language pack.

  1. Open the language pack download page for the .NET Framework version you’ve installed:

    • .NET Framework 4.8.1
    • .NET Framework 4.8
    • .NET Framework 4.7.2
    • .NET Framework 4.7.1
    • .NET Framework 4.7
    • .NET Framework 4.6.2
    • .NET Framework 4.6.1
    • .NET Framework 4.6
    • .NET Framework 4.5.2
    • .NET Framework 4.5.1
    • .NET Framework 4.5
  2. In the language list, choose the language you want to download, and wait a few seconds for the page to reload in that language.

  3. Choose Download.

The following table lists the supported languages.

Language Culture
Arabic ar
Czech cs
Danish da
Dutch nl
Finnish fi
English (USA) en-US
French fr
German de
Greek el
Hebrew he
Hungarian hu
Italian it
Japanese ja
Korean ko
Norwegian no
Polish pl
Portuguese (Brazil) pt-BR
Portuguese (Portugal) pt-PT
Russian ru
Simplified Chinese zh-CHS
Spanish es
Swedish sv
Traditional Chinese zh-CHT
Turkish tr

Next steps

  • If you’re new to .NET Framework, see the overview for an introduction to key concepts and components.

  • For new features and improvements in .NET Framework 4.5 and all later versions, see What’s New.

  • For detailed information about deploying .NET Framework with your app, see Deployment Guide for Developers.

  • For changes that affect the deployment of .NET Framework with your app, see Reducing System Restarts During .NET Framework 4.5 Installations.

  • For information about migrating your app from .NET Framework 4 to .NET Framework 4.5 or later versions, see the migration guide.

  • See .NET Framework Reference Source to browse through .NET Framework source code online. The reference source is also available on GitHub. You can download the reference source for offline viewing and step through the sources (including patches and updates) during debugging. For more information, see the blog entry A new look for .NET Reference Source.

See also

  • Deployment Guide for Developers
  • Deployment Guide for Administrators
  • Install the .NET Framework 3.5 on Windows 11, Windows 10, Windows 8.1, and Windows 8
  • Troubleshoot Blocked .NET Framework Installations and Uninstallations

Понравилась статья? Поделить с друзьями:
  • Visual studio stack overflow error
  • Vipnet ошибка открытия почтовой базы c program files infotecs vipnet client msarch
  • Vipnet ошибка инициализации транспортного каталога
  • Vipnet ошибка 238
  • Vipnet выдает ошибку при установке