卸载 Visual StudioUninstall Visual Studio

Note

本文适用于 Visual Studio 2015。This article applies to Visual Studio 2015. 如果你正在寻找最新的 Visual Studio 文档,请在左上方使用版本选择器。If you're looking for the latest Visual Studio documentation, use the version selector at the top left. 建议升级到 Visual Studio 2019。We recommend upgrading to Visual Studio 2019. 在此处下载Download it here

有关 Visual Studio 的最新文档,请参阅卸载 Visual StudioFor the latest documentation on Visual Studio, see Uninstall Visual Studio.

此页面介绍如何卸载 Visual Studio 2015(一个面向开发人员的工作效率工具集成套件的早期版本)。This page walks you through uninstalling Visual Studio 2015, an earlier version of our integrated suite of productivity tools for developers.

使用“标准”卸载方法卸载 Visual StudioUninstall Visual Studio by using the "standard" uninstallation method

  1. 在“控制面板”上的“程序和功能”页中,选择要卸载的产品版本,然后选择“更改”。In Control Panel, on the Programs and Features page, choose the product edition that you want to uninstall, and then choose Change.

  2. 在安装向导中,选择“卸载”,再选择“是”,然后在向导中按照其余说明进行操作。In the Setup wizard, choose Uninstall, choose Yes, and then follow the remaining instructions in the wizard.

    此标准或默认方法将留下首次安装 Visual Studio 时最初安装的某些项(例如,Microsoft .NET Framework、Microsoft Visual C++ 可再发行组件、Microsoft SQL Server 等)。This standard, or default method will leave some items behind that your first installation of Visual Studio originally installed (for example, the Microsoft .NET Framework, Microsoft Visual C++ Redistributables, Microsoft SQL Server, etc.). 由于其他许多应用程序依赖于这些已安装的项,因此我们会保留这些项。We leave these installed because many other applications depend on them. 但是,如果也要将其删除,请选择“程序和功能”中对应的条目,然后逐个进行删除。However, if you want to remove them too, select their entry in Programs and Features, and then remove each individually.

  1. 找到 Visual Studio .exe 文件(例如,找到“vs_enterprise.exe”)。Locate the Visual Studio .exe file (for example, locate "vs_enterprise.exe").

    Note

    该文件应位于“%ProgramData%\Package Cache”的子文件夹中,例如:C:\ProgramData\Package Cache\{37e19555-e88d-4aed-9d42-82d0784d2b79}\vs_enterprise.exeThe file should be in a subfolder of "%ProgramData%\Package Cache", for example: C:\ProgramData\Package Cache\{37e19555-e88d-4aed-9d42-82d0784d2b79}\vs_enterprise.exe

  2. 使用 /uninstall /force 命令行参数运行 .exe 文件。Run the .exe file by using the /uninstall /force command-line parameters.

    例如,运行 vs_enterprise.exe /uninstall /force,这将删除 Visual Studio 以及留在默认卸载中的大部分核心组件。For example, run vs_enterprise.exe /uninstall /force, which will remove Visual Studio and most of the core components that are left behind in a default uninstallation. 但是,不会删除 Visual Studio 附加产品和扩展可以安装的所有其他内容(例如,Visual Studio 更新和其他可选组件)。However, it will not remove all of the additional content that Visual Studio add-ons and extensions can install (for example, Visual Studio updates, and other optional components).

    Tip

    或者,可以使用“卸载程序总数”工具来删除 Visual Studio 或 Visual Studio 更新可能已安装的所有项。Alternatively, you can use the "Total Uninstaller" tool to remove everything that Visual Studio or updates to Visual Studio might have installed. 也就是说,任何版本的 Visual Studio 2013 或更高版本。That is, any version of Visual Studio 2013 or later. 若要获取详细信息,请参阅 GitHub 上的 Visual Studio 卸载程序工具To find out more, see the Visual Studio Uninstaller tool on GitHub.

在无提示或被动模式下卸载 Visual Studio(即,从源中卸载)Uninstall Visual Studio in silent or passive modes (that is, to uninstall from source)

  1. 在安装了 Visual Studio 的计算机上,打开 Windows 命令提示符。On the computer where Visual Studio is installed, open the Windows command prompt.

  2. 输入以下参数:Enter the following parameters:

    DVDRoot \<Installation File> </quiet|/passive> [/norestart]/uninstallDVDRoot \<Installation File> </quiet|/passive> [/norestart]/uninstall

回滚到早期版本的 Visual StudioRoll back to a previous version or release of Visual Studio

  1. 使用本主题中列出的任何方法卸载 Visual Studio。Uninstall Visual Studio by using any of the methods listed in this topic.

    Warning

    可能不会按预期卸载当前版本的 Visual Studio(或 Visual Studio 更新)然后安装早期版本。Uninstalling a current release of Visual Studio (or a Visual Studio Update) and then installing a previous release might not work as expected.

    结果取决于已安装 Visual Studio 的哪个版本、已安装其组件的哪些版本、已安装哪些产品(可能具有依赖项 Visual Studio 版本或其组件),以及计划安装或重新安装 Visual Studio 的哪个早期版本。The outcome depends on the which version or release of Visual Studio you have installed, which versions of its components are installed, which products are installed that might have dependencies either the Visual Studio release or its components, and finally, on which earlier Visual Studio version you plan to install or reinstall. 由于所有这些变量,标准卸载通常会保留可能不适用于早期版本的 Visual Studio 的组件。Because of all these variables, a standard uninstall will often leave components behind that might not work with previous Visual Studio versions or releases.

    因此,为了获得最佳结果,我们建议使用 Visual Studio 卸载程序工具Therefore, for best results, we recommend using the Visual Studio Uninstaller tool.

  2. 安装或重新安装要使用的 Visual Studio 的早期版本。Install or reinstall the earlier version of Visual Studio that you want to use.

    即使安装早期版本的 Visual Studio,安装程序可能仍会尝试使用较新版本(如果有)。Even if you install a previous version of Visual Studio, the Setup program might still try to use a newer version or release if one is available. 有关详细信息,请参阅如何:安装特定版本的 Visual Studio 主题。For more detailed information, see the How to: Install a Specific Release of Visual Studio topic.

请参阅See also