針對 .NET Framework 安裝和解除安裝遭封鎖的問題進行疑難排解Troubleshoot blocked .NET Framework installations and uninstallations

當您執行 .NET Framework 4.5 或更新版本的 Web 或離線安裝程式時,可能會遇到阻止或封鎖安裝 .NET Framework 的問題。When you run the web or offline installer for the .NET Framework 4.5 or later versions, you might encounter an issue that prevents or blocks the installation of the .NET Framework. 下面表格列出可能造成阻礙的問題並且提供疑難排解資訊。The following table lists possible blocking issues and provides links to troubleshooting information.

在 Windows 8 (含) 以上版本中,.NET Framework 是作業系統元件,無法單獨解除安裝。In Windows 8 and above, the .NET Framework is an operating system component and cannot be independently uninstalled. .NET Framework 的更新會出現在 [控制台] 之 [程式和功能] 應用程式的 [已安裝更新] 索引標籤中。Updates to the .NET Framework appear in the Installed Updates tab of the Control Panel Programs and Features app. 若是未預先安裝 .NET Framework 的作業系統,.NET Framework 會出現在 [主控台] 之 [程式和功能] 應用程式的 [解除安裝或​​變更程式] 索引標籤 (或 [新增/移除程式] 索引標籤) 中。For operating systems on which the .NET Framework is not preinstalled, the .NET Framework appears in the Uninstall or change a program tab (or the Add/Remove programs tab) of the Program and Features app in Control Panel. 如需預先安裝 .NET Framework 之 Windows 版本的資訊,請參閱系統需求For information on the Windows versions on which the .NET Framework is preinstalled, see System Requirements.

重要

因為 .NET Framework 4.x 版是就地更新,所以您無法在已安裝更新版本的系統上安裝舊版 .NET Framework 4.x。Because the 4.x versions of the .NET Framework are in-place updates, you cannot install an earlier version of the .NET Framework 4.x on a system that already has a later version installed. 例如,在 Windows 10 Fall Creators Update 系統上,您無法安裝 .NET Framework 4.6.2,因為作業系統已預先安裝 .NET Framework 4.7.1。For example, on a system with Windows 10 Fall Creators Update, you cannot install the .NET Framework 4.6.2, since the .NET Framework 4.7.1 is preinstalled with the operating system.

您可以判斷系統上所安裝之 .NET Framework 的版本。You can determine which versions of the .NET Framework are installed on a system. 如需詳細資訊,請參閱如何:判斷安裝的 .NET Framework 版本See How to: Determine Which .NET Framework Versions Are Installed for more information.

下表中的 4.5.x 是指 .NET Framework 4.5 和其點發行版本,4.5.1 和 4.5.2、4.6.x 是指 .NET Framework 4.6 和其點發行版本 4.6.1 和 4.6.2,4.7.x 是指 .NET Framework 4.7 和其點發行版本 4.7.1 和 4.7.2,而 4.8 是指 .NET Framework 4.8。In this table, 4.5.x refers to the .NET Framework 4.5 and its point releases, 4.5.1, and 4.5.2, 4.6.x refers to the .NET Framework 4.6 and its point releases, 4.6.1 and 4.6.2, 4.7.x refers to the .NET Framework 4.7 and its point releases, 4.7.1 and 4.7.2, and 4.8 refers to .NET Framework 4.8.

封鎖訊息Blocking message 如需詳細資訊或解決這個問題For more information or to resolve the issue
解除安裝 Microsoft .NET Framework 可能會導致某些應用程式停止運作。Uninstalling the Microsoft .NET Framework may cause some applications to cease to function. 一般而言,您不應該解除安裝電腦上已安裝的任何 .NET Framework 版本,因為您使用的應用程式可能相依於特定的 .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 of the .NET Framework. 如需詳細資訊,請參閱使用者入門指南中的適用於使用者的 .NET FrameworkFor more information, see The .NET Framework for users in the Getting Started guide.
這部電腦已安裝 .NET Framework 4.5.x/4.6.x/4.7.x (繁體中文) 或更新版本。.NET Framework 4.5.x/4.6.x/4.7.x (ENU) or a later version is already installed on this computer. 不需要採取任何動作。No action necessary.

若要判斷系統上所安裝之 .NET Framework 的版本,請參閱如何:判斷所安裝的 .NET Framework 版本To determine which versions of the .NET Framework are installed on a system, see How to: Determine Which .NET Framework Versions Are Installed.
.NET Framework 4.5.x/4.6.x/4.7.x/4.8 (「語言」) 需要 .NET Framework 4.5.x/4.6.x/4.7.x/4.8。The .NET Framework 4.5.x/4.6.x/4.7.x/4.8 (language) requires the .NET Framework 4.5.x/4.6.x/4.7.x/4.8. 請從下載中心安裝 .NET Framework 4.5.x/4.6.x/4.7.x/4.8,並重新執行安裝程式。Please install the .NET Framework 4.5.x/4.6.x/4.7.x/4.8 from the Download Center and rerun Setup. 在安裝語言套件之前,必須安裝指定 .NET Framework 版本的英文版本。You must install the English version of the specified .NET Framework release before installing a language pack. 如需詳細資訊,請參閱《安裝指南》中的安裝語言套件一節。For more information, see the section on To install language packs in the installation guide.
無法安裝 .NET Framework 4.5.x/4.6.x/4.7.x/4.8。Cannot install the .NET Framework 4.5.x/4.6.x/4.7.x/4.8. 電腦上的其他應用程式與這個程式不相容。Other applications on your computer are not compatible with this program.

-或--or-

電腦上的其他應用程式與這個程式不相容。Other applications on your computer are not compatible with this program.
這個訊息最可能的原因是安裝了 .NET Framework 的預覽或 RC 版本。The most likely cause of this message is that a preview or RC version of the .NET Framework was installed. 解除安裝預覽版本或 RC 版本,並重新執行安裝程式。Uninstall the preview or RC version and rerun Setup.
無法使用這個套件解除安裝 .NET Framework 4.5.x/4.6.x/4.7.x/4.8。.NET Framework 4.5.x/4.6.x/4.7.x/4.8 cannot be uninstalled using this package. 若要從電腦將 .NET Framework 4.5.x/4.6.x/4.7.x/4.8 解除安裝,請移至 [控制台],依序選擇 [程式和功能]、[檢視已安裝的更新]、[Microsoft Windows (KB2828152) 更新],然後選擇 [解除安裝]。To uninstall .NET Framework 4.5.x/4.6.x/4.7.x/4.8 from your computer, go to Control Panel, choose Programs and Features, choose View installed updates, select Update for Microsoft Windows (KB2828152) and then choose Uninstall. 您要安裝的套件無法解除安裝 .NET Framework 的預覽版本或 RC 版本。The package you are installing doesn't uninstall preview or RC releases of the .NET Framework.

請從 [控制台] 解除安裝預覽版本或 RC 版本。Uninstall the preview or RC release from Control Panel.
無法解除安裝 .NET Framework 4.5.x/4.6.x/4.7.x/4.8。Cannot uninstall the .NET Framework 4.5.x/4.6.x/4.7.x/4.8. 電腦上的其他應用程式依存於這個程式。Other applications on your computer are dependent on this program. 一般而言,您不應該解除安裝電腦上的任何 .NET Framework 版本,因為您使用的應用程式可能相依於特定的 .NET Framework 版本。In general, you shouldn't uninstall any versions of the .NET Framework from your computer, because an application you use may depend on a specific version of the .NET Framework. 如需詳細資訊,請參閱使用者入門指南中的適用於使用者的 .NET FrameworkFor more information, see The .NET Framework for users in the Getting Started guide.
.NET Framework 4.5.x/4.6.x/4.7.x/4.8 可轉散發套件不適用於這個作業系統。The .NET Framework 4.5.x/4.6.x/4.7.x/4.8 redistributable does not apply to this operating system. 請從 Microsoft 下載中心下載適用於作業系統的 .NET Framework 4.5.x/4.6.x/4.7.x/4.8。Please download the .NET Framework 4.5.x/4.6.x/4.7.x/4.8 for your operating system from the Microsoft Download Center. 您可能嘗試在不支援的平台上安裝 4.5.1、4.5.2、4.6、4.6.1、4.6.2、4.7、4.7.1、4.7.2 或 4.8,或您選擇的安裝套件未包含所支援的全部作業系統所需的元件。You may be trying to install .NET Framework 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 on a platform that isn't supported, or you have chosen the installation package that does not include the components for all supported operating systems. 請使用離線安裝程式 (4.5.14.5.24.64.6.14.6.24.74.7.14.7.24.8) 來重新執行安裝。Run the installation again by using the offline installer (for 4.5.1, for 4.5.2, for 4.6, for 4.6.1, for 4.6.2, for 4.7), for 4.7.1, for 4.7.2, or for 4.8. 如需詳細資訊,請參閱安裝指南系統需求以了解支援的作業系統。For more information, see the installation guide and system requirements for supported operating systems.
您必須先安裝對應至 KB<號碼> 的更新,才能安裝此產品。The update corresponding to KB<number> needs to be installed before you can install this product. .NET Framework 的安裝需要先安裝 KB 更新,才能安裝 .NET Framework。Installation of the .NET Framework requires that a KB update be installed before installing the .NET Framework. 請安裝更新,再重新開始 .NET Framework 安裝。Install the update, and then begin the .NET Framework installation again.

例如,若要在 Windows 8.1、Windows RT 8.1 和 Windows Server 2012 R2 上安裝 .NET Framework 的更新版本,需要安裝對應至 KB 2919355 的更新。For example, installation of updated versions of the .NET Framework on Windows 8.1, Windows RT 8.1, and Windows Server 2012 R2 requires that the update corresponding to KB 2919355 be installed.
您的電腦目前執行的是 Windows Server 2008 作業系統的 Server Core 安裝。Your computer is currently running a Server Core installation of the Windows Server 2008 operating system. .NET Framework 4.5.x 需要較新版本的作業系統。The .NET Framework 4.5.x requires a later release of the operating system. 請安裝 Windows Server 2008 R2 SP1 或更新版本並重新執行 .NET Framework 4.5.x 安裝程式。Please install Windows Server 2008 R2 SP1 or higher and rerun .NET Framework 4.5.x setup. Windows Server 2008 R2 SP1 (含) 以後版本的 Server Core 角色才支援 .NET Framework 4.5.1 和 4.5.2。The .NET Framework 4.5.1 and 4.5.2 are supported in the Server Core role with Windows Server 2008 R2 SP1 or later. 請參閱系統需求See System Requirements.
您沒有足夠權限為此電腦的所有使用者完成這項作業。You do not have sufficient privileges to complete this operation for all users of this computer. 請以系統管理員身分登入,然後重新執行安裝程式Log on as an administrator and rerun Setup. 您必須是此電腦的系統管理員,才能安裝 .NET Framework。You must be an administrator on the computer to install the .NET Framework.
安裝程式無法繼續,因為前一個安裝要求您的電腦必須重新啟動。Setup cannot continue because a previous installation requires your computer to be restarted. 請重新啟動您的電腦,然後再重新執行安裝程式。Please restart your computer and rerun Setup. 有時需要重新開機才能完成安裝。A restart is sometimes required to fully complete an installation. 請遵循指示重新啟動您的電腦,然後再重新執行安裝程式。Follow the instructions to restart your computer and rerun Setup.

在罕見的情況下,如果 Windows 偵測到一些遺失更新,並將重新啟動以安裝佇列中的下一個更新,系統可能會要求您多次重新啟動系統。In rare cases, you may be asked to restart your system more than once if Windows has detected a number of missing updates and is restarting to install the next update in the queue.
.NET Framework 安裝程式無法在程式相容性模式中執行。.NET Framework Setup cannot be run in Program Compatibility Mode. 請參閱本文稍後的程式相容性問題一節。See the Program Compatibility Issues section later in this article.
未安裝 .NET Framework 4.5.x/4.6.x/4.7.x/4.8,因為元件存放區已損毀。.NET Framework 4.5.x/4.6.x/4.7.x/4.8 has not been installed because the component store has been corrupted. 如需詳細資訊,請參閱使用 DISM 或系統更新整備工具修復 Windows Update 錯誤See Fix Windows Update errors by using the DISM or System Update Readiness tool for more information.
安裝程式無法執行,因為這部電腦沒有可用的 Windows Installer 服務。Setup cannot run because the Windows Installer Service is not available on this computer. 請參閱 Microsoft 支援服務網站上的 Windows Installer Service error when installing or updating programs(安裝或更新程式時發生 Windows Installer 服務錯誤)。See Windows Installer Service error when installing or updating programs on the Microsoft Support website.
安裝程式無法正確執行,因為這部電腦沒有可用的 Windows Update 服務。Setup may not run properly because the Windows Update Service is not available on this computer. 電腦可能是設定為使用 Windows Server Update Services (WSUS),而不是使用 Microsoft Windows Update。The computer may be configured to use Windows Server Update Services (WSUS) instead of Microsoft Windows Update. 如需詳細資訊,請參閱當您嘗試在 Windows 8 或 Windows Server 2012 安裝 .NET Framework 3.5 時產生錯誤碼中的錯誤碼 0x800F0906 一節。For more information, see the section for error code 0x800F0906 in Error codes when you try to install the .NET Framework 3.5 in Windows 8 or Windows Server 2012.

另外,請參閱 Microsoft 支援服務網站上的如何取得最新版的 Windows Update 代理程式以幫助管理電腦更新Also see How to obtain the latest version of the Windows Update Agent to help manage updates on a computer on the Microsoft Support website.
安裝程式無法正確執行,因為這部電腦沒有可用的背景智慧型傳送服務 (BITS)。Setup may not run properly because the Background Intelligent Transfer Service (BITS) is not available on this computer. 請參閱 Microsoft 支援服務網站上的 An update to prevent a Background Intelligent Transfer Service (BITS) crash on a Windows Vista-based computer (可防止背景智慧型傳送服務 (BITS) 在 Windows Vista 電腦上損毀的更新)。See An update to prevent a Background Intelligent Transfer Service (BITS) crash on a Windows Vista-based computer on the Microsoft Support website.
因為 Windows Update 發生錯誤並顯示錯誤碼 0x80070643 或 0x643,所以安裝程式可能無法正常執行。Setup may not run properly because Windows update encountered an error and displayed error code 0x80070643 or 0x643. 請參閱 Microsoft 支援服務網站上的 .NET Framework 更新安裝錯誤:"0x80070643" 或 "0x643"See .NET Framework update installation error: "0x80070643" or "0x643" on the Microsoft Support website.
.NET Framework 4.5..x/4.6.x/4.7.x/4.8 已經包含在此作業系統中。The .NET Framework 4.5.x/4.6.x/4.7.x/4.8 is already a part of this operating system. 您不需要安裝 .NET Framework 4.5.x/4.6.x/4.7.x/4.8 可轉散發套件。You do not need to install the .NET Framework 4.5.x/4.6.x/4.7.x/4.8 redistributable. 不需執行任何動作。No action.

若要判斷系統上所安裝之 .NET Framework 的版本,請參閱如何:判斷所安裝的 .NET Framework 版本To determine which versions of the .NET Framework are installed on a system, see How to: Determine Which .NET Framework Versions Are Installed. 如需支援的作業系統,請參閱系統需求See System Requirements for supported operating systems.
這個作業系統不支援 .NET Framework 4.5.x/4.6.x/4.7.x/4.8。The .NET Framework 4.5.x/4.6.x/4.7.x/4.8 is not supported on this operating system. 如需支援的作業系統,請參閱系統需求See System Requirements for supported operating systems.

若是 .NET framework 在 Windows 7 上安裝失敗,此訊息通常表示未安裝 Windows 7 SP1。For failed installations of the .NET Framework on Windows 7, this message typically indicates that Windows 7 SP1 is not installed. 在 Windows 7 系統中,.NET Framework 需要 Windows 7 SP1。On Windows 7 systems, the .NET Framework requires Windows 7 SP1. 若您使用 Windows 7 而尚未安裝 Service Pack 1,就必須先加以安裝,才能安裝 .NET Framework。If you are on Windows 7 and have not yet installed Service Pack 1, you will need to do so before installing the .NET Framework. 如需安裝 Windows 7 SP1 的資訊,請參閱了解如何安裝 Windows 7 Service Pack 1 (SP1)For information on installing Windows 7 SP1, see Learn how to install Windows 7 Service Pack 1 (SP1).
您的電腦目前執行的是 Windows Server 2008 作業系統的 Server Core 安裝。Your computer is currently running a Server Core installation of Windows Server 2008 operating system. .NET Framework 4.5.x 需要完整版的作業系統或 Server Core 2008 R2 SP1。The .NET Framework 4.5.x requires a full release of the operating system or Server Core 2008 R2 SP1. 請安裝 Windows Server 2008 SP2 或 Windows Server 2008 R2 SP1 或 Server Core 2008 R2 SP1 的完整版本,並重新執行 .NET Framework 4.5.x 安裝程式。Please install the full version of Windows Server 2008 SP2 or Windows Server 2008 R2 SP1 or Server Core 2008 R2 SP1 and rerun .NET Framework 4.5.x Setup. Windows Server 2008 R2 SP1 (含) 以後版本的 Server Core 角色才有支援 .NET Framework。The .NET Framework is supported in the Server Core role with Windows Server 2008 R2 SP1 or later. 請參閱系統需求See System Requirements.
.NET Framework 4.5.x 已是這個作業系統的一部分,但目前處於關閉狀態 (僅限 Windows Server 2012Windows Server 2012)。The .NET Framework 4.5.x is already a part of this operating system but is currently turned off (Windows Server 2012Windows Server 2012 only). 請參閱 Windows 網站上的開啟或關閉 Windows 功能See Turn Windows features on or off on the Windows website.
這個安裝程式需要 x86 電腦,This setup program requires an x86 computer. 無法安裝在 x64 或 IA64 電腦上。It cannot be installed on x64 or IA64 computers. 請參閱系統需求See System Requirements.
這個安裝程式需要 x64 或 x86 電腦,This setup program requires x64 or x86 computer. 無法安裝在 IA64 電腦上。It cannot be installed on IA64 computers. 請參閱系統需求See System Requirements.

程式相容性問題Program compatibility issues

在 Windows 程式相容性模式中執行時,.NET Framework 4.5 或其點發行版本安裝會因為 1603 錯誤碼或封鎖而失敗。The installation of the .NET Framework 4.5 or its point releases fails with a 1603 error code or blocks when it's running in Windows Program Compatibility mode. [程式相容性助理] 會指出 .NET Framework 可能沒有正確安裝,並提示您使用建議的設定 (程式相容性模式) 來重新安裝。The Program Compatibility Assistant indicates that the .NET Framework might not have been installed correctly and prompts you to reinstall it by using the recommended setting (Program Compatibility mode). 也有可能先前試圖執行 .NET Framework 安裝程式時失敗或取消了,而已經由「程式相容性助理」設定了程式相容性模式。Program Compatibility mode could also have been set by the Program Compatibility Assistant on earlier failed or canceled attempts to run the .NET Framework Setup.

.NET Framework 安裝程式無法在程式相容性模式中執行。The .NET Framework installer cannot run in Program Compatibility mode. 若要解決這個封鎖問題,您必須使用 [登錄編輯程式] 來確保未啟用全系統的相容性模式設定:To resolve this blocking issue, you must use Registry Editor to ensure that the compatibility mode setting is not enabled system-wide:

  1. 選擇 [開始] 按鈕,然後選擇 [執行]。Choose the Start button, and then choose Run.

  2. 在 [執行] 對話方塊中,鍵入 "regedit",然後選擇 [確定]。In the Run dialog box, type "regedit", and then choose OK.

  3. 在 [登錄編輯程式] 中,瀏覽至下列子機碼:In Registry Editor, browse to the following subkeys:

    • HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\PersistedHKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Persisted

    • HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\LayersHKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

  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 下載名稱,然後刪除這些項目。In the Name column, look for the .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 download names, depending on which version you are installing, and delete these entries. 如需下載名稱,請參閱安裝適用於開發人員的 .NET Framework一文。For download names, see Install the .NET Framework for developers article.

  5. 請重新執行 4.5、4.5.1、4.5.2、4.6、4.6.1、4.6.2、4.7、4.7.1 或 4.7.2 版的 .NET Framework 安裝程式。Rerun the .NET Framework installer for version 4.5, 4.5.1, 4.5.2, or 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, or 4.7.2.

請參閱See also