.NET Framework 版本和相依性.NET Framework versions and dependencies

每一版 .NET Framework 都包含通用語言執行平台 (CLR)、基底類別庫及其他 Managed 程式庫。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. .NET Framework 版本號碼會隨每個發行版本遞增,但是 CLR 版本不一定會遞增。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. (沒有 CLR 版本 3)。(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.

在下表中,[隨附於/可安裝於 Windows] 與 [隨附於/可安裝於 Windows Server] 欄中標有 ✓ 的作業系統版本上安裝的 .NET Framework 版本,必須在控制台中啟用 (適用於 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 版本.NET Framework version CLR 版本CLR version 包含在Included in
Visual StudioVisual Studio
版本version
✓ 隨附於✓ Included in
+ 可安裝於+ Can be installed on
WindowsWindows
✓ 隨附於✓ Included in
+ 可安裝於+ Can be installed on
Windows ServerWindows Server
判斷已安裝的 .NET 版本To determine installed .NET version
4.7.24.7.2

新功能New features

協助工具的新功能New in accessibility
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 Creators Update (版本 1703)+ 10 Creators Update (Version 1703)
+ 10 Anniversary Update (版本 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:

- 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
44 ✓ 10 Fall Creators Update (版本 1709)✓ 10 Fall Creators Update (Version 1709)

+ 10 Creators Update (版本 1703)+ 10 Creators Update (Version 1703)
+ 10 Anniversary Update (版本 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 Creators Update 及 Windows Server,版本 1709)- 461308 (Windows 10 Creators Update and Windows Server, version 1709)
- 461310 (所有其他 OS 版本)- 461310 (all other OS versions)

(請參閱相關指示)(see instructions)
4.74.7

新功能New features
44 ✓ 10 Creators Update (版本 1703)✓ 10 Creators Update (Version 1703)

+ 10 Anniversary Update (版本 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 Creators Update)- 460798 (Windows 10 Creators Update)
- 460805 (所有其他作業系統版本)- 460805 (all other OS versions)

(請參閱相關指示)(see instructions)
4.6.24.6.2

新功能New features
44 ✓ 10 年度更新 (版本 1607)✓ 10 Anniversary Update (Version 1607)

+ 10 November Update (版本 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
44 ✓ 10 11 月更新 (版本 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 11 月更新)- 394254 (Windows 10 November Update)
- 394271 (所有其他作業系統版本)- 394271 (all other OS versions)

(請參閱相關指示)(see instructions)
4.64.6

新功能New features
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
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
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
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.5 為就地更新,其會取代您電腦上的 .NET Framework 4.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 也是 .NET Framework 4.5.NET Framework 4.5 的就地更新,亦即其全都使用相同的執行階段版本,但組件版本會更新,並包含新的類型及成員。The .NET Framework 4.5.NET Framework 4.5 is an in-place update that replaces the .NET Framework 4.NET Framework 4 on your computer, and similarly, the .NET Framework 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, and 4.7.2 are in-place updates to the .NET Framework 4.5.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.NET Framework 4.5.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, .NET Framework 4.5.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.5 上執行以 .NET Framework 4.6.NET Framework 4.6 為目標的應用程式。For example, we do not recommend that you run an app the targets the .NET Framework 4.6.NET Framework 4.6 on the .NET Framework 4.5.NET Framework 4.5. 以下是適用的方針:The following guidelines apply:

  • 在 Visual Studio 中,您可以選擇 .NET Framework 4.5.NET Framework 4.5 做為專案的目標架構 (這會設定 GetReferenceAssemblyPaths.TargetFrameworkMoniker 屬性) 來將專案編譯成 .NET Framework 4.5.NET Framework 4.5 組件或可執行檔。In Visual Studio, you can choose the .NET Framework 4.5.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.NET Framework 4.5 assembly or executable. 接著,此組件或可執行檔即可用於任何安裝有 .NET Framework 4.5.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 的電腦上。This assembly or executable can then be used on any computer that has the .NET Framework 4.5.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, or 4.7.2 installed.

  • 在 Visual Studio 中,您可以選擇 .NET Framework 4.5.1.NET Framework 4.5.1 做為專案的目標架構 (這會設定 GetReferenceAssemblyPaths.TargetFrameworkMoniker 屬性) 來將專案編譯成 .NET Framework 4.5.1.NET Framework 4.5.1 組件或可執行檔。In Visual Studio, you can choose the .NET Framework 4.5.1.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.NET Framework 4.5.1 assembly or executable. 此組件或可執行檔只能在已安裝 .NET Framework 4.5.1.NET Framework 4.5.1 或 .NET Framework 最新版本的電腦上執行。This assembly or executable should be run only on computers that have the .NET Framework 4.5.1.NET Framework 4.5.1 or a later version of the .NET Framework installed. .NET Framework 4.5.1.NET Framework 4.5.1 為目標的可執行檔將在只安裝舊版 .NET Framework (例如 .NET Framework 4.5.NET Framework 4.5) 的電腦上遭到封鎖而無法執行,而且系統會提示使用者安裝 .NET Framework 4.5.1.NET Framework 4.5.1An executable that targets the .NET Framework 4.5.1.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 the .NET Framework 4.5.NET Framework 4.5, installed, and the user will be prompted to install the .NET Framework 4.5.1.NET Framework 4.5.1. 此外,也不應從目標為舊版 .NET Framework (如 .NET Framework 4.5.NET Framework 4.5) 的應用程式呼叫 .NET Framework 4.5.1.NET Framework 4.5.1 組件。In addition, the .NET Framework 4.5.1.NET Framework 4.5.1 assemblies should not be called from an app that targets an earlier version of the .NET Framework, such as the .NET Framework 4.5.NET Framework 4.5.

    .NET Framework 4.5.1.NET Framework 4.5.1.NET Framework 4.5.NET Framework 4.5 在這裡僅作示範用途。The .NET Framework 4.5.1.NET Framework 4.5.1 and .NET Framework 4.5.NET Framework 4.5 are used here only as examples. 此準則適用於目標較安裝於執行所在系統上版本更新之 .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.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 the .NET Framework 4.5.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) 所建置。The .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.5、4.5.1、4.5.2、4.6、4.6.1、4.6.2、4.7、4.7.1 與 4.7.2) 也會出現單一安裝的連續圖層。However, the .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, and 4.7.2) also represent successive layers of a single installation. 從 .NET Framework 4 開始,您可以使用同處理序並存裝載功能,在單一處理序中執行多個 CLR 版本。Starting with the .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