安装和卸载 .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 (ENU) 或更高版本。.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. 可能是因为尝试在不受支持的平台上安装 .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,也可能是因为已选择的安装程序包不包含适用于所有受支持操作系统的组件。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.7.14.7.24.8 的脱机安装程序(适用于 4.5.14.5.24.64.6.14.6.24.7)再次运行安装。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 安装需要在安装 .NET Framework 之前先安装 KB 更新。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 操作系统的服务器核心安装。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. .NET Framework 4.5.1 和 4.5.2 在带有 Windows Server 2008 R2 SP1 或更高版本的服务器核心角色中受支持。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 更新错误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 服务错误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 更新代理的最新版本以帮助管理计算机上的更新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 支持网站上的用于防止基于 Windows Vista 的计算机上的后台智能传输服务 (BITS) 发生崩溃的更新See An update to prevent a Background Intelligent Transfer Service (BITS) crash on a Windows Vista-based computer on the Microsoft Support website.
安装程序可能无法正常运行,因为 Windows 更新遇到了错误并显示错误代码 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.

Windows 7 上安装 .NET Framework 失败时,此消息通常会指示未安装 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,则需要先安装 SP1,然后才能安装 .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 操作系统的服务器核心安装。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. .NET Framework 在带有 Windows Server 2008 R2 SP1 或更高版本的服务器核心角色中受支持。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

.NET Framework 4.5 及其单点版本的安装失败并显示错误代码 1603,或在 Windows 程序兼容性模式下运行时受到阻止。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