安裝適用於開發人員的 .NET FrameworkInstall the .NET Framework for developers

.NET 是在 Windows 上執行之許多應用程式不可或缺的一部分,提供應用程式執行所需的常見功能。.NET is an integral part of many apps running on Windows and provides common functionality for those apps to run. 對開發人員而言,.NET Framework 提供全方位且一致的程式撰寫模型,可建置具有令人視覺震撼之使用者體驗及順暢且安全之通訊的應用程式。For developers, the .NET Framework provides a comprehensive and consistent programming model for building apps that have visually stunning user experiences and seamless and secure communication.

注意

本主題適用於希望在其本身的系統上安裝 .NET Framework,或希望將 .NET Framework 與其應用程式一併安裝的開發人員。This topic is intended for developers who either want to install the .NET Framework on their own system or who want to install it with their applications. 若使用者希望安裝 .NET Framework,請參閱討論在特定作業系統上安裝 .NET Framework 的其他主題,例如在 Windows 10 和 Windows Server 2016 上安裝 .NET FrameworkFor users interested in installing the .NET Framework, see the individual topics that discuss installing the .NET Framework on specific operating systems, such as Install the .NET Framework on Windows 10 and Windows Server 2016.

本文提供在電腦上安裝所有版本 .NET Framework (從 .NET Framework 4.5 到 .NET Framework 4.7.2.NET Framework 4.7.2) 的連結。This article provides links for installing all versions of the .NET Framework from the .NET Framework 4.5 to the .NET Framework 4.7.2.NET Framework 4.7.2 on your computer. 如果您是開發人員,也可以使用這些連結下載 .NET Framework 並隨應用程式轉散發。If you're a developer, you can also use these links to download and redistribute the .NET Framework with your apps. 如需隨應用程式部署 .NET Framework 版本的相關資訊,請參閱 .NET Framework 開發人員部署指南For information on deploying a version of the .NET Framework with your app, see .NET Framework deployment guide for developers.

重要

從 .NET Framework 4 開始,所有 .NET Framework 版本均為就地更新,因此系統上只能存在單一的 4.x 版本。All .NET Framework versions since .NET Framework 4 are in-place updates, so only a single 4.x version can be present on a system. 此外,Windows 作業系統的某些版本已預先安裝特定的 .NET Framework 版本。In addition, particular versions of the .NET Framework are pre-installed on some versions of the Windows operating system. 這表示:This means that:

  • 如果電腦上已安裝較新的 4.x 版本,您就無法安裝舊的 4.x 版本。If there's a later 4.x version installed on the machine already, you can't install a previous 4.x version.
  • 如果 OS 已預先安裝特定的 .NET Framework 版本,您就無法在相同電腦上安裝舊的 4.x 版本。If the OS comes pre-installed with a particular .NET Framework version, you can't install a previous 4.x version on the same machine.
  • 如果您安裝較新的版本,則不需要先將舊版解除安裝。If you install a later version, you don't have to first uninstall the previous version.

如需 .NET Framework 的版本以及如何判斷電腦上已安裝哪些版本的詳細資訊,請參閱版本和相依性如何:判斷安裝的 .NET Framework 版本For more information about versions of the .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.

注意

如需 .NET Framework 3.5 的資訊,請參閱 在 Windows 10、Windows 8.1 及 Windows 8 上安裝 .NET Framework 3.5For information on the .NET Framework 3.5, see Install the .NET Framework 3.5 on Windows 10, Windows 8.1, and Windows 8.

使用下表取得快速連結,或進一步閱讀詳細資料。Use the following table for quick links, or read further for details. 若要檢閱 .NET Framework 的系統需求再進行安裝,請參閱系統需求To view the system requirements for the .NET Framework before installation, see System Requirements. 如需疑難排解的協助,請參閱疑難排解For help with troubleshooting, see Troubleshooting.

.NET Framework 版本.NET Framework version 開發人員安裝Developer installation 可轉散發安裝Redistributable installation 平台支援Platform support
4.7.24.7.2 .NET Framework 4.7.2 開發人員套件.NET Framework 4.7.2 Developer Pack 下載中心 4.7.2 Web 安裝程式Download Center 4.7.2 web installer

下載中心 4.7.2 離線安裝程式Download Center 4.7.2 offline installer
包含在:Included in:
Windows 10 2018 年 10 月更新Windows 10 October 2018 Update
Windows 10 2018 4 月更新Windows 10 April 2018 Update

您可以安裝於:You can install on:

Windows 10 Fall Creators UpdateWindows 10 Fall Creators Update
Windows 10 Creators UpdateWindows 10 Creators Update
Windows 10 年度更新Windows 10 Anniversary Update
Windows 8.1 (含) 以前版本Windows 8.1 and earlier
Windows Server,1709 版 (含) 以前版本Windows Server, version 1709 and earlier
(如需完整清單,請參閱系統需求)(for a full list, see system requirements)
4.7.14.7.1 .NET Framework 4.7.1 開發人員套件NET Framework 4.7.1 Developer Pack 4.7.1 Web 安裝程式的下載頁面Download page for 4.7.1 web installer

4.7.1 離線安裝程式的下載頁面Download page for 4.7.1 offline installer
包含在:Included in:
Windows 10 Fall Creators UpdateWindows 10 Fall Creators Update
Windows Server,版本 1709Windows Server, version 1709

您可以安裝於:You can install on:
Windows 10 Creators UpdateWindows 10 Creators Update
Windows 10 年度更新Windows 10 Anniversary Update
Windows 8.1 (含) 以前版本Windows 8.1 and earlier
Windows Server 2016 (含) 以前版本Windows Server 2016 and earlier
(如需完整清單,請參閱系統需求)(for a full list, see system requirements)
4.74.7 .NET Framework 4.7 開發人員套件NET Framework 4.7 Developer Pack 4.7 Web 安裝程式的下載頁面Download page for 4.7 web installer

4.7 離線安裝程式的下載頁面Download page for 4.7 offline installer
包含在:Included in:
Windows 10 Creators UpdateWindows 10 Creators Update

您可以安裝於:You can install on:
Windows 10 年度更新Windows 10 Anniversary Update
Windows 8.1 (含) 以前版本Windows 8.1 and earlier
Windows Server 2016 (含) 以前版本Windows Server 2016 and earlier
(如需完整清單,請參閱系統需求)(for a full list, see system requirements)
4.6.24.6.2 .NET Framework 4.6.2 開發人員套件NET Framework 4.6.2 Developer Pack 4.6.2 Web 安裝程式的下載頁面Download page for 4.6.2 web installer

4.6.2 離線安裝程式的下載頁面Download page for 4.6.2 offline installer
包含在:Included in:
Windows 10 年度更新Windows 10 Anniversary Update

您可以安裝於:You can install on:
Windows 10 11 月更新Windows 10 November Update
Windows 10Windows 10
Windows 8.1 (含) 以前版本Windows 8.1 and earlier
Windows Server 2012 R2 (含) 以前版本Windows Server 2012 R2 and earlier
(如需完整清單,請參閱系統需求)(for a full list, see system requirements)
4.6.14.6.1 .NET Framework 4.6.1 開發人員套件NET Framework 4.6.1 Developer Pack 4.6.1 Web 安裝程式的下載頁面Download page for 4.6.1 web installer

4.6.1 離線安裝程式的下載頁面Download page for 4.6.1 offline installer
您可以安裝於:You can install on:
Windows 10Windows 10
Windows 8.1 (含) 以前版本Windows 8.1 and earlier
Windows Server 2012 R2 (含) 以前版本Windows Server 2012 R2 and earlier
(如需完整清單,請參閱系統需求)(for a full list, see system requirements)
4.64.6 隨附於 Visual Studio 2015。Included in Visual Studio 2015.

Microsoft .NET Framework 4.6 目標套件Microsoft .NET Framework 4.6 targeting pack
4.6 Web 安裝程式的下載頁面Download page for 4.6 web installer

4.6 離線安裝程式的下載頁面Download page for 4.6 offline installer
包含在:Included in:
Windows 10Windows 10
Visual Studio 2015Visual Studio 2015

您也可以安裝於:You can also install on:
Windows 8.1 (含) 以前版本Windows 8.1 and earlier
Windows Server 2012 R2 (含) 以前版本Windows Server 2012 R2 and earlier
(如需完整清單,請參閱系統需求)(for a full list, see system requirements)
4.5.24.5.2 Microsoft .NET Framework 4.5.2 開發人員套件Microsoft .NET Framework 4.5.2 Developer Pack

適用於 Visual Studio 2013、Visual Studio 2012 或其他 IDEFor use with Visual Studio 2013, Visual Studio 2012, or other IDEs
4.5.2 Web 安裝程式的下載頁面Download page for 4.5.2 web installer

4.5.2 離線安裝程式的下載頁面Download page for 4.5.2 offline installer
您可以安裝於:You can install on:
Windows 8.1 (含) 以前版本Windows 8.1 and earlier
Windows Server 2012 R2 (含) 以前版本Windows Server 2012 R2 and earlier
(如需完整清單,請參閱系統需求)(for a full list, see system requirements)
4.5.14.5.1 Microsoft .NET Framework 4.5.1 開發人員套件Microsoft .NET Framework 4.5.1 Developer Pack

適用於 Visual Studio 2013、Visual Studio 2012 或其他 IDEFor use with Visual Studio 2013, Visual Studio 2012 or other IDEs
4.5.1 Web 安裝程式的下載頁面Download page for 4.5.1 web installer

4.5.1 離線安裝程式的下載頁面Download page for 4.5.1 offline installer
包含在:Included in:
Windows 8.1Windows 8.1
Windows Server 2012 R2Windows Server 2012 R2
Visual Studio 2013Visual Studio 2013

您也可以安裝於:You can also install on:
Windows 8Windows 8 (含) 以前版本and earlier
Windows Server 2012Windows Server 2012 (含) 以前版本and earlier
(如需完整清單,請參閱系統需求)(for a full list, see system requirements)
4.54.5 隨附於 Visual Studio 2012Included in Visual Studio 2012

同時也隨附於 Windows 8 SDKAlso available as part of the Windows 8 SDK
4.5 Web 安裝程式的下載頁面Download page for 4.5 web installer 包含在:Included in:
Windows 8Windows 8
Windows Server 2012Windows Server 2012
Visual Studio 2012Visual Studio 2012

您也可以安裝於:You can also install on:
Windows 7 (含) 以前版本Windows 7 and earlier
Windows Server 2008 SP2 (含) 以前版本 Windows Server 2008 SP2 and earlier
(如需完整清單,請參閱系統需求)(for a full list, see system requirements)

您可以在所有支援的平台上,安裝特定 .NET Framework 版本的開發人員套件 (如果有的話)。You can install the Developer Pack for a specific version of the .NET Framework, if one is available, on all supported platforms.

您可以在下列版本上安裝 Web 或離線安裝程式You can install the Web or Offline installer on:

  • Windows 8.1 (含) 以前版本Windows 8.1 and earlier

  • Windows Server 2012 R2 (含) 以前版本Windows Server 2012 R2 and earlier

如需完整清單,請參閱系統需求For a full list, see System Requirements.

如需適用於使用者和開發人員的 .NET Framework 一般簡介,請參閱使用者入門For a general introduction to the .NET Framework for both users and developers, see Getting Started. 如需隨應用程式部署 .NET Framework 的資訊,請參閱部署指南For information about deploying the .NET Framework with your app, see the deployment guide. 若要閱讀有關 .NET Framework 架構與重要功能的資訊,請參閱概觀To read about the architecture and key features of the .NET Framework, see the overview.

安裝選項Installation choices

安裝適用於開發人員的套件以在 Visual Studio 或其他開發環境中開發最新版 .NET Framework,或下載 .NET Framework 可轉散發套件以隨應用程式或控制項散發。Install a developer targeting pack to develop against the most recent version of the .NET Framework in Visual Studio or another development environment, or download the .NET Framework redistributable for distribution with your app or control.

安裝 .NET Framework 開發人員套件或目標套件To install the .NET Framework Developer Pack or Targeting Pack

「目標套件」可讓您的應用程式在 Visual Studio 和其他開發環境中開發時,以特定版本的 .NET Framework 為目標。A targeting pack lets your app target a specific version of the .NET Framework when developing in Visual Studio and some other development environments. 「開發人員套件」包含特定版本的 .NET Framework 和其隨附的 SDK,以及對應的目標套件。A developer pack includes a specific version of the .NET Framework and its accompanying SDK along with its corresponding targeting pack.

.NET Framework 4.5.1 或 4.5.2 的開發人員套件、.NET Framework 4.6 的目標套件以及 .NET Framework 4.6.1、4.6.2、4.7、4.7.1 或 4.7.2 的開發人員套件,提供特定 .NET Framework 版本的參考組件、語言套件以及 IntelliSense 檔案,供用於 Visual Studio 這類的整合式開發環境。The developer pack for the .NET Framework 4.5.1 or 4.5.2, the targeting pack for the .NET Framework 4.6, and the developer pack for the .NET Framework 4.6.1, 4.6.2, 4.7, 4.7.1, or 4.7.2 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. 若是使用 Visual Studio,開發人員套件或目標套件也會將已安裝的 .NET Framework 版本加入您在建立新專案時所選擇的目標。If you are using Visual Studio, the developer pack or targeting pack also adds the installed version of the .NET Framework to the target choices when you create a new project. 選擇下列其中一項:Choose one of the following:

從開發人員套件下載頁面選擇 [下載]。From the developer pack download page, choose Download. 接下來選擇 [執行] 或 [儲存],然後在出現提示時遵循指示進行。Next choose Run or Save, and follow the instructions when prompted. 您也可以安裝 .NET Framework 特定版本的開發人員套件或目標套件,方法是從 Visual Studio 安裝程式的 [.NET 桌面開發] 工作負載中的選用元件選取它,如下圖所示。You can also install the developer pack or targeting pack for a specific version of the .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.

Visual Studio 安裝程式與 .NET 桌面開發工作負載

當您以 .NET Framework 的特定版本為目標時,您的應用程式會使用該版本開發人員套件隨附的參考組件來建立。When you target a particular version of the .NET Framework, your application is built by using the reference assemblies that are included with that version's developer pack. 在執行階段,會從全域組件快取解析組件,且不會使用參考組件。At runtime, assemblies are resolved from the Global Assembly Cache, and the reference assemblies are not used.

從 Visual Studio 或從命令列使用 MSBuild 建置應用程式時,MSBuild 可能會顯示錯誤 MSB3644:「找不到架構 <架構版本> 的參考組件。」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." 若要解決錯誤,請下載該版本 .NET Framework 的開發人員套件或目標套件。To address the error, download the developer pack or the targeting pack for that version of the .NET Framework.

安裝或下載 .NET Framework 可轉散發套件To install or download the .NET Framework redistributable

安裝程式會針對以這些 .NET Framework 版本為目標的應用程式或控制項,下載 .NET Framework 元件。Installers download the .NET Framework components for an app or control that targets those versions of the .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 安裝程式 (Web 啟動載入器) 會從 Web 下載符合安裝電腦作業系統的必要元件和語言套件。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.

  • 離線安裝程式 (獨立可轉散發套件) 包含安裝 .NET Framework 所需的全部必要元件,但不包含語言套件。Offline installer (standalone redistributable) contains all the required components for installing the .NET Framework but doesn't contain language packs. 這個下載的大小大於 Web 安裝程式。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.

Web 和離線安裝程式都是針對 x86 和 x64 為主的電腦所設計 (請參閱系統需求),但是不支援 Itanium 架構的電腦。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. 開啟您要安裝之 .NET Framework 版本的下載頁面:Open the download page for the .NET Framework version you want to install:

  2. 選取下載頁面的語言。Select the language for the download page. 這個選項不會下載 .NET Framework 的當地語系化資源,只會影響下載頁面上顯示的文字。This option does not download the localized resources of the .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:

    • 如果您要在電腦上安裝 .NET Framework,請選擇 [執行],然後依照螢幕上的提示執行。If you want to install the .NET Framework on your computer, choose Run, and then follow the prompts on your screen.

    • 如果您要下載轉散發的 .NET Framework,請選擇 [儲存],然後依照螢幕上的提示執行。If you want to download the .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.

注意

如果您在安裝期間遇到任何問題,請參閱疑難排解If you encounter any problems during the installation, see Troubleshooting.

安裝注意事項:Installation notes:

  • .NET Framework 4.5.1.NET Framework 4.5.1 與 4.5.2 以及 .NET Framework 4.6.NET Framework 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.1.NET Framework 4.5.1 and 4.5.2, as well as the .NET Framework 4.6.NET Framework 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.

  • .NET Framework 4.5.NET Framework 4.5、其小數點版本、.NET Framework 4.6.NET Framework 4.6 及其小數點版本與 .NET Framework 4.7 和其小數點版本會取代 .NET Framework 4.NET Framework 4The .NET Framework 4.5.NET Framework 4.5, its point releases, the .NET Framework 4.6.NET Framework 4.6 and its point releases, and the .NET Framework 4.7 and its point releases replace the .NET Framework 4.NET Framework 4. 如果您在已安裝 .NET Framework 4.NET Framework 4 的系統上安裝這些版本,組件就會被取代。When you install these versions on a system that has the .NET Framework 4.NET Framework 4 installed, the assemblies are replaced.

  • 解除安裝 .NET Framework 4.5.NET Framework 4.5、其小數點版本、.NET Framework 4.6.NET Framework 4.6 和其小數點版本或 .NET Framework 4.7 以及其小數點版本,會同時移除既有的 .NET Framework 4.NET Framework 4 檔案。Uninstalling the .NET Framework 4.5.NET Framework 4.5, its point releases, the .NET Framework 4.6.NET Framework 4.6 and its point releases, or the .NET Framework 4.7 and its point releases also removes pre-existing .NET Framework 4.NET Framework 4 files. 如果您想要回到 .NET Framework 4.NET Framework 4,則必須重新安裝它及其所有更新If you want to go back to the .NET Framework 4.NET Framework 4, you must reinstall it and any updates to it. (請參閱 安裝 .NET Framework 4)。(See Installing the .NET Framework 4.)

  • 您必須具有系統管理認證,才可安裝 .NET Framework 4.5.NET Framework 4.5、其小數點版本、.NET Framework 4.6 和其小數點版本以及 .NET Framework 4.7 和其小數點版本。You must have administrative credentials to install the .NET Framework 4.5.NET Framework 4.5, its point releases, the .NET Framework 4.6 and its point releases, and the .NET Framework 4.7 and its point release.

  • .NET Framework 4.5 可轉散發套件已於 2012 年 10 月 9 日更新,更正了與數位憑證時間戳記錯誤相關的問題,這個問題會造成 Microsoft 所產生和簽署之檔案中的數位簽章提前過期。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. 如果您先前安裝了日期為 2012 年 8 月 16 日的 .NET Framework 4.5 可轉散發套件,我們建議您使用 Microsoft 下載中心最新的可轉散發套件進行更新。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 Microsoft Download Center. 如需這個問題的詳細資訊,請參閱 Microsoft 資訊安全諮詢 2749655知識庫文章 2770445For more information about this issue, see Microsoft Security Advisory 2749655 and Knowledge Base article 2770445.

若要安裝語言套件To install language packs

語言套件是包含所支援語言之當地語系化資源的可執行檔 (例如,翻譯的錯誤訊息和 UI 文字)。Language packs are executable files that contain the localized resources (such as translated error messages and UI text) for supported languages. 如果您未安裝語言套件,則會以英文顯示 .NET Framework 錯誤訊息及其他文字。If you don't install a language pack, .NET Framework error messages and other text are displayed in English. 請注意,Web 安裝程式會自動安裝符合您作業系統的語言套件,但是您可以將其他語言套件下載至您的電腦。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.

重要

語言套件不包含執行應用程式所需的 .NET Framework 元件,因此您必須先執行 Web 或離線安裝程式,然後再安裝語言套件。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. 如果您已安裝語言套件,請將其解除安裝、安裝 .NET Framework,然後重新安裝語言套件。If you have already installed a language pack, uninstall it, install the .NET Framework, and then reinstall the language pack.

  1. 開啟您已安裝之 .NET Framework 版本的語言套件下載頁面:Open the language pack download page for the .NET Framework version you've installed:

  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 cultureCulture
阿拉伯文Arabic arar
捷克文Czech cscs
丹麥文Danish dada
荷蘭文Dutch nlnl
芬蘭文Finnish fifi
英文 (美國)English (USA) en-USen-US
法文French frfr
德文German dede
希臘文Greek elel
希伯來文Hebrew hehe
匈牙利文Hungarian huhu
義大利文Italian itit
日文Japanese jaja
韓文Korean koko
挪威文Norwegian no
波蘭文Polish plpl
葡萄牙文 (巴西)Portuguese (Brazil) pt-BRpt-BR
葡萄牙文 (葡萄牙)Portuguese (Portugal) pt-PTpt-PT
俄文Russian ruru
簡體中文Simplified Chinese zh-CHSzh-CHS
西班牙文Spanish eses
瑞典文Swedish svsv
繁體中文Traditional Chinese zh-CHTzh-CHT
土耳其文Turkish trtr

後續步驟Next steps

另請參閱See also