.NET Framework 版本和依赖关系.NET Framework versions and dependencies

每个版本的 .NET framework 都包含公共语言运行时 (CLR)、基类库和其他托管库。Each version of the .NET Framework contains the common language runtime (CLR), the base class libraries, and other managed libraries. 本主题按版本介绍了 .NET Framework 的关键功能,提供了有关基础 CLR 版本和相关开发环境的信息,并标识了 Windows 操作系统所安装的版本。This topic describes the key features of the .NET Framework by version, provides information about the underlying CLR versions and associated development environments, and identifies the versions that are installed by the Windows operating system.

备注

若要了解如何下载和安装 .NET Framework,请参阅安装面向开发人员的 .NET FrameworkFor information on downloading and installing the .NET Framework, see Install the .NET Framework for developers.

下表总结了 .NET Framework 版本历史,并将每个版本与 Visual Studio、Windows 和 Windows Server 相关联。The following table summarizes .NET Framework version history and correlates each version with Visual Studio, Windows, and Windows Server. 请注意,Visual Studio 提供了多目标功能,因此你将不会限于仅使用列出的 .NET Framework 版本。Note that Visual Studio provides multi-targeting, so you are not limited to the version of the .NET Framework that is listed.

每个新版本的 .NET Framework 都会保留早期版本中的功能并会添加新功能。Each new version of the .NET Framework retains features from the previous versions and adds new features. CLR 由其自己的版本号标识。The CLR is identified by its own version number. 虽然 CLR 版本并不总是递增的,但 .NET Framework 版本号在每次发布时都会递增。The .NET Framework version number is incremented at each release, although the CLR version is not always incremented. 例如,.NET Framework 4、4.5 和更高版本包含 CLR 4,而 .NET Framework 2.0、3.0 和 3.5 包含 CLR 2.0。For example, the .NET Framework 4, 4.5, and later releases include CLR 4, but the .NET Framework 2.0, 3.0, and 3.5 include CLR 2.0. (没有版本 3 的 CLR。)(There was no version 3 of the CLR.)

有关受支持操作系统的完整列表,请参阅系统要求See System Requirements for a complete list of supported operating systems. 有关下载,请参阅安装面向开发人员的 .NET FrameworkFor downloads, see Install the .NET Framework for developers. 若要确定计算机上安装的是哪个版本的 .NET Framework,请参阅如何:确定已安装的 .NET Framework 版本For determining which versions of the .NET Framework are installed on a computer, see How to: Determine Which .NET Framework Versions Are Installed.

在表中,带有标记 ✓ 的操作系统版本上安装的 .NET Framework 版本必须在控制面板中启用(适用于 Windows)或通过服务器管理器启用(适用于 Windows Server),该标记显示在“包含在/可安装在 Windows 中” 和“包含在/可安装在 Windows Server 中” 列中。In the table, versions of the .NET Framework that are installed on operating system versions marked with ✓ in the Included in/Can be installed on Windows and the Included in/Can be installed on Windows Server columns must be enabled in Control Panel (for Windows) or enabled through the Server Manager (for Windows Server).

重要

下表仅列出了 .NET Framework 已发布版本的密钥。The following table lists the keys of released versions of the .NET Framework only. 它并没有列出预览版或预发布版本的密钥。It doesn't list the keys of preview or pre-release versions.

.NET Framework 版本.NET Framework version CLR 版本CLR version 包含于Included in
Visual StudioVisual Studio
versionversion
✓ 包括在内✓ Included in
+ 可在其上安装+ Can be installed on
WindowsWindows
✓ 包括在内✓ Included in
+ 可在其上安装+ Can be installed on
Windows ServerWindows Server
确定已安装的 .NET 版本To determine installed .NET version
4.84.8

新增功能New features

辅助功能的新增功能New in accessibility

发行说明Release notes
44 ✓ 10 2019 年 5 月更新✓ 10 May 2019 Update

+ 10 2018 年 10 月更新(版本 1809)+ 10 October 2018 Update (Version 1809)
+ 10 2018 年 4 月更新(版本 1803)+ 10 April 2018 Update (Version 1803)
+ 10 Fall Creators Update(版本 1709)+ 10 Fall Creators Update (Version 1709)
+ 10 创意者更新(版本 1703)+ 10 Creators Update (Version 1703)
+ 10 周年更新(版本 1607)+ 10 Anniversary Update (Version 1607)
+ 8.1+ 8.1
+7+7
+ Windows Server 2019+ Windows Server 2019
+ Windows Server,版本 1809+ Windows Server, version 1809
+ Windows Server 版本 1803+ Windows Server, version 1803
+ 2016+ 2016
+ 2012 R2+ 2012 R2
+ 2012+ 2012
+ 2008 R2 SP1+ 2008 R2 SP1
使用 Release DWORD:Use Release DWORD:

- 528040(Windows 10 2019 年 5 月更新)- 528040 (Windows 10 May 2019 Update)
- 528049(所有其他 OS 版本)- 528049 (all other OS versions)

(请参阅说明(see instructions)
4.7.24.7.2

新增功能New features

辅助功能的新增功能New in accessibility

发行说明Release notes
44 ✓ 10 2018 年 10 月更新(版本 1809)✓ 10 October 2018 Update (Version 1809)
✓ 10 2018 年 4 月更新(版本 1803)✓ 10 April 2018 Update (Version 1803)

+ 10 Fall Creators Update(版本 1709)+ 10 Fall Creators Update (Version 1709)
+ 10 创意者更新(版本 1703)+ 10 Creators Update (Version 1703)
+ 10 周年更新(版本 1607)+ 10 Anniversary Update (Version 1607)
+ 8.1+ 8.1
+7+7
✓ Windows Server 2019✓ Windows Server 2019
✓ Windows Server 版本 1809✓ Windows Server, version 1809
✓ Windows Server 版本 1803✓ Windows Server, version 1803

+ Windows Server 版本 1709+ Windows Server, version 1709
+ 2016+ 2016
+ 2012 R2+ 2012 R2
+ 2012+ 2012
+ 2008 R2 SP1+ 2008 R2 SP1
使用 Release DWORD:Use Release DWORD:

- 461814(Windows 10 2018 年 10 月更新)- 461814 (Windows 10 October 2018 Update)
- 461808(Windows 10 2018 年 4 月更新和 Windows Server 版本 1803)- 461808 (Windows 10 April 2018 Update and Windows Server, version 1803)
- 461814(所有其他操作系统版本)- 461814 (all other OS versions)

(请参阅说明(see instructions)
4.7.14.7.1

新增功能New features

辅助功能的新增功能New in accessibility

发行说明Release notes
44 ✓ 10 Fall Creators Update(版本 1709)✓ 10 Fall Creators Update (Version 1709)

+ 10 创意者更新(版本 1703)+ 10 Creators Update (Version 1703)
+ 10 周年更新(版本 1607)+ 10 Anniversary Update (Version 1607)
+ 8.1+ 8.1
+7+7
+ Windows Server 版本 1803+ Windows Server, version 1803

✓ Windows Server 版本 1709✓ Windows Server, version 1709

+ 2016+ 2016
+ 2012 R2+ 2012 R2
+ 2012+ 2012
+ 2008 R2 SP1+ 2008 R2 SP1
使用 Release DWORD:Use Release DWORD:

- 461308(Windows 10 创意者更新和 Windows Server 版本 1709)- 461308 (Windows 10 Creators Update and Windows Server, version 1709)
- 461310(所有其他操作系统版本)- 461310 (all other OS versions)

(请参阅说明(see instructions)
4.74.7

新增功能New features

发行说明Release notes
44 ✓ 10 创意者更新(版本 1703)✓ 10 Creators Update (Version 1703)

+ 10 周年更新(版本 1607)+ 10 Anniversary Update (Version 1607)
+ 8.1+ 8.1
+7+7
+ 2016+ 2016
+ 2012 R2+ 2012 R2
+ 2012+ 2012
+ 2008 R2 SP1+ 2008 R2 SP1
使用 Release DWORD:Use Release DWORD:

- 460798(Windows 10 创意者更新)- 460798 (Windows 10 Creators Update)
- 460805(所有其他操作系统版本)- 460805 (all other OS versions)

(请参阅说明(see instructions)
4.6.24.6.2

新增功能New features

发行说明Release notes
44 ✓ 10 周年更新(版本 1607)✓ 10 Anniversary Update (Version 1607)

+ 10 十一月更新(版本 1511)+ 10 November Update (Version 1511)
+ 10+ 10
+ 8.1+ 8.1
+ 7+ 7
✓ 2016✓ 2016

+ 2012 R2+ 2012 R2
+ 2012+ 2012
+ 2008 R2 SP1+ 2008 R2 SP1
使用 Release DWORD:Use Release DWORD:

- 394802(Windows 10 周年更新和 Windows Server 2016)- 394802 (Windows 10 Anniversary Update and Windows Server 2016)
- 394806(所有其他操作系统版本)- 394806 (all other OS versions)

(请参阅说明(see instructions)
4.6.14.6.1

新增功能New features

发行说明Release notes
44 ✓ 10 十一月更新(版本 1511)✓ 10 November Update (Version 1511)

+ 10+ 10
+ 8.1+ 8.1
+ 8+ 8
+ 7+ 7
+ 2012 R2+ 2012 R2
+ 2012+ 2012
+ 2008 R2 SP1+ 2008 R2 SP1
使用 Release DWORD:Use Release DWORD:

- 394254(Windows 10 十一月更新)- 394254 (Windows 10 November Update)
- 394271(所有其他操作系统版本)- 394271 (all other OS versions)

(请参阅说明(see instructions)
4.64.6

新增功能New features

发行说明Release notes
44 20152015 ✓ 10✓ 10

+ 8.1+ 8.1
+ 8+ 8
+ 7+ 7
+ Vista+ Vista
+ 2012 R2+ 2012 R2
+ 2012+ 2012
+ 2008 R2 SP1+ 2008 R2 SP1
+ 2008 SP2+ 2008 SP2
使用 Release DWORD:Use Release DWORD:

- 393295 (Windows 10)- 393295 (Windows 10)
- 393297(所有其他操作系统版本)- 393297 (all other OS versions)

(请参阅说明(see instructions)
4.5.24.5.2

新增功能New features

发行说明Release notes
44 - + 8.1+ 8.1
+ 8+ 8
+ 7+ 7
+ Vista+ Vista
+ 2012 R2+ 2012 R2
+ 2012+ 2012
+ 2008 R2 SP1+ 2008 R2 SP1
+ 2008 SP2+ 2008 SP2
使用 Release DWORD:Use Release DWORD:

379893379893

(请参阅说明(see instructions)
4.5.14.5.1

新增功能New features

发行说明Release notes
44 20132013 ✓ 8.1✓ 8.1

+ 8+ 8
+ 7+ 7
+ Vista+ Vista
✓ 2012 R2✓ 2012 R2

+ 2012+ 2012
+ 2008 R2 SP1+ 2008 R2 SP1
+ 2008 SP2+ 2008 SP2
使用 Release DWORD:Use Release DWORD:

- 378675 (Windows 8.1)- 378675 (Windows 8.1)
- 378758(所有其他)- 378758 (all other)

(请参阅说明(see instructions)
4.54.5

新增功能New features

发行说明Release notes
44 20122012 ✓ 8✓ 8
+ 7+ 7
+ Vista+ Vista
✓ 2012✓ 2012
+ 2008 R2 SP1+ 2008 R2 SP1
+ 2008 SP2+ 2008 SP2
使用 Release DWORD:Use Release DWORD:

378389378389

(请参阅说明(see instructions)
44

新增功能New features
44 20102010 + 7+ 7
+ Vista+ Vista
+ 2008 R2 SP1+ 2008 R2 SP1
+ 2008 SP2+ 2008 SP2
+ 2003+ 2003
请参阅说明See instructions
3.53.5

新增功能New features
2.02.0 20082008 ✓ 10*✓ 10*
✓ 8.1*✓ 8.1*
✓ 8*✓ 8*
✓ 7✓ 7

+ Vista+ Vista
+ Windows Server,版本 1803*+ Windows Server, version 1803*
+ Windows Server,版本 1709*+ Windows Server, version 1709*
+ 2016*+ 2016*
+ 2012 R2*+ 2012 R2*
+ 2012*+ 2012*

✓2008 R2 SP1*✓2008 R2 SP1*

+ 2008 SP2+ 2008 SP2
+ 2003+ 2003
请参阅说明See instructions
3.03.0

新增日期:New:
WPF、WCF、WF、CardSpaceWPF, WCF, WF, CardSpace
2.02.0 - ✓ Vista✓ Vista ✓ 2008 R2 SP1*✓ 2008 R2 SP1*
✓ 2008 SP2*✓ 2008 SP2*

+ 2003+ 2003
请参阅说明See instructions
2.02.0

新增功能New features
2.02.0 20052005 - ✓ 2008 R2 SP1✓ 2008 R2 SP1
✓ 2008 SP2✓ 2008 SP2
✓ 2003✓ 2003
请参阅说明See instructions
1.11.1

新增功能New features
1.11.1 20032003 - ✓ 2003✓ 2003 请参阅说明See instructions
1.01.0 1.01.0 Visual Studio .NETVisual Studio .NET - - 请参阅说明See instructions

备注Notes

*  必须通过控制面板 (Windows) 或服务器管理器 (Windows Server) 在此操作系统上启用 .NET Framework。*  The .NET Framework must be enabled on this operating system through Control Panel (for Windows) or the Server Manager (for Windows Server).

通常,你不应卸载计算机上安装的 .NET Framework 的任何版本,因为你使用的应用程序可能依赖于特定版本,如果你移除该版本,则应用程序可能会中断。In general, you should not uninstall any versions of the .NET Framework that are installed on your computer, because an application you use may depend on a specific version and may break if that version is removed. 你可以在一台计算机上同时加载 .NET Framework 的多个版本。You can load multiple versions of the .NET Framework on a single computer at the same time. 这意味着,你可以安装 .NET Framework 而无需卸载早期版本。This means that you can install the .NET Framework without having to uninstall previous versions. 有关详细信息,请参阅入门For more information, see Getting Started.

面向并运行 .NET Framework 版本 4.5 和更高版本的应用Targeting and running .NET Framework apps for version 4.5 and later

.NET Framework 4.5 是替代计算机上的 .NET Framework 4 的就地更新,同样,.NET Framework 4.5.1、4.5.2、4.6、4.6.1、4.6.2、4.7、4.7.1、4.7.2 和 4.8 是对 .NET Framework 4.5 的就地更新,这意味着它们将使用相同的运行时版本,但程序集版本会更新并包含新类型和成员。.NET Framework 4.5 is an in-place update that replaces .NET Framework 4 on your computer, and similarly, .NET Framework 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, and 4.8 are in-place updates to .NET Framework 4.5, which means that they use the same runtime version, but the assembly versions are updated and include new types and members. 安装其中一个更新后,.NET Framework 4、.NET Framework 4.5、.NET Framework 4.6 或 .NET Framework 4.7 应用应继续运行,而无需重新编译。After you install one of these updates, your .NET Framework 4, .NET Framework 4.5, .NET Framework 4.6, or .NET Framework 4.7 apps should continue to run without requiring recompilation. 但是,反过来则不行。However, the reverse is not true. 建议不要在较早版本的 .NET Framework 上运行面向更高版本的 .NET Framework 的应用。We do not recommend running apps that target a later version of the .NET Framework on an earlier version of the .NET Framework. 例如,我们不建议在 .NET Framework 4.5 上运行面向 .NET Framework 4.6 的应用。For example, we do not recommend that you run an app the targets .NET Framework 4.6 on .NET Framework 4.5. 以下准则将适用:The following guidelines apply:

  • 在 Visual Studio 中,可以选择 .NET Framework 4.5 作为项目的目标框架(这将设置 GetReferenceAssemblyPaths.TargetFrameworkMoniker 属性),以将项目编译为 .NET Framework 4.5 程序集或可执行文件。In Visual Studio, you can choose .NET Framework 4.5 as the target framework for a project (this sets the GetReferenceAssemblyPaths.TargetFrameworkMoniker property) to compile the project as a .NET Framework 4.5 assembly or executable. 此程序集或可执行文件随后可用于安装了 .NET Framework 4.5、4.5.1、4.5.2、4.6、4.6.1、4.6.2、4.7、4.7.1、4.7.2 或 4.8 的任何计算机。This assembly or executable can then be used on any computer that has the .NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, or 4.8 installed.

  • 在 Visual Studio 中,可以选择 .NET Framework 4.5.1 作为项目​​的目标框架(这将设置 GetReferenceAssemblyPaths.TargetFrameworkMoniker 属性),以将项目编译为 .NET Framework 4.5.1 程序集或可执行文件。In Visual Studio, you can choose .NET Framework 4.5.1 as the target framework for a project (this sets the GetReferenceAssemblyPaths.TargetFrameworkMoniker property) to compile the project as a .NET Framework 4.5.1 assembly or executable. 此程序集或可执行文件应仅在安装了 .NET Framework 4.5.1 或更高版本的 .NET Framework 的计算机上运行。This assembly or executable should be run only on computers that have .NET Framework 4.5.1 or a later version of the .NET Framework installed. 将阻止面向 .NET Framework 4.5.1 的可执行文件在仅安装了更低版本的 .NET Framework(​​例如 .NET Framework 4.5)的计算机上运行,并且系统会提示用户安装 .NET Framework 4.5.1。An executable that targets .NET Framework 4.5.1 will be blocked from running on a computer that only has an earlier version of the .NET Framework, such as .NET Framework 4.5, installed, and the user will be prompted to install the .NET Framework 4.5.1. 此外,不应从面向更低版本的 .NET Framework(例如 .NET Framework 4.5)的应用中调用 .NET Framework 4.5.1 程序集。In addition, .NET Framework 4.5.1 assemblies should not be called from an app that targets an earlier version of the .NET Framework, such as .NET Framework 4.5.

    .NET Framework 4.5.1 和 .NET Framework 4.5 在此处仅用作示例。.NET Framework 4.5.1 and .NET Framework 4.5 are used here only as examples. 此原则适用于任意满足以下条件的应用:应用所面向的 .NET framework 版本高于运行该应用的系统上的 .NET framework 版本。This principle applies to any app that targets a later version of the .NET Framework than the one installed on the system on which it is running.

.NET Framework 中的某些更改可能需要更改应用代码;在使用 .NET Framework 4.5 或更高版本运行现有应用前,请参阅应用程序兼容性Some changes in the .NET Framework may require changes to your app code; see Application Compatibility before you run your existing apps with .NET Framework 4.5 or later versions. 若要了解如何安装当前版本,请参阅安装面向开发人员的 .NET FrameworkFor more information about installing the current version, see Install the .NET Framework for developers. 有关对 .NET Framework 的支持的信息,请参阅 Microsoft 支持网站上的 Microsoft .NET Framework 支持生命周期策略For information about support for the .NET Framework, see Microsoft .NET Framework Support Lifecycle Policy on the Microsoft Support website.

以针对早期版本的应用程序为目标并运行这些应用程序Targeting and running apps for older versions

.NET Framework 版本 2.0、3.0 和 3.5 使用同一 CLR 版本 (CLR 2.0) 生成。.NET Framework versions 2.0, 3.0, and 3.5 are built with the same version of the CLR (CLR 2.0). 这些版本表示单个安装的连续层。These versions represent successive layers of a single installation. 每个版本将基于早期版本以增量方式生成。Each version is built incrementally on top of the earlier versions. 无法在计算机上并行运行版本 2.0、3.0 和 3.5。It is not possible to run versions 2.0, 3.0, and 3.5 side by side on a computer. 在安装 3.5 版时,你将自动获得 2.0 和 3.0 层,并且为版本 2.0、3.0 和 3.5 生成的应用程序均可在 3.5 版上运行。When you install version 3.5, you get the 2.0 and 3.0 layers automatically, and apps that were built for versions 2.0, 3.0, and 3.5 can all run on version 3.5. 但是,.NET Framework 4 结束了此分层方法,且 .NET Framework 4 及更高版本(.NET Framework 4.5、4.5.1、4.5.2、4.6、4.6.1、4.6.2、4.7、4.7.1、4.7.2 和 4.8)也表示单个安装的连续层。However, .NET Framework 4 ends this layering approach, and it and later releases (.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, and 4.8) also represent successive layers of a single installation. 从 .NET Framework 4 开始,可使用进程内并行托管在单个进程中运行 CLR 的多个版本。Starting with .NET Framework 4, you can use in-process side-by-side hosting to run multiple versions of the CLR in a single process. 有关详细信息,请参阅程序集和并行执行For more information, see Assemblies and Side-by-Side Execution.

此外,如果应用面向 2.0、3.0 或 3.5 版,你的用户可能需要先在 Windows 8、Windows 8.1 或 Windows 10 计算机上启用 .NET Framework 3.5,然后才能运行应用。In addition, if your app targets version 2.0, 3.0, or 3.5, your users may be required to enable the .NET Framework 3.5 on a Windows 8, Windows 8.1, or Windows 10 computer before they can run your app. 有关详细信息,请参阅在 Windows 10、Windows 8.1 和 Windows 8 上安装 .NET Framework 3.5For more information, see Install the .NET Framework 3.5 on Windows 10, Windows 8.1, and Windows 8.

后续步骤Next steps

请参阅See also