通过添加或删除工作负载和组件修改 Visual StudioModify Visual Studio by adding or removing workloads and components

可轻松修改 Visual Studio,使其在你需要时包含想要的内容。It's easy to modify Visual Studio so that it includes only what you want, when you want it. 为此,请打开 Visual Studio 安装程序以添加或删除工作负载和组件。To do so, open the Visual Studio Installer to add or remove workloads and components.

我们不但简化了 Visual Studio 的个性化设置,让用户能够轻松匹配所需完成的任务,还简化了 Visual Studio 的自定义操作。Not only have we made it easier for you to personalize Visual Studio to match the tasks you want to accomplish, we've also made it easier to customize Visual Studio, too. 要执行此操作,请打开新的 Visual Studio 安装程序,即可进行所需更改。To do so, open the new Visual Studio Installer and make the changes you want.

操作方法如下。Here's how.

重要

若要安装、更新或修改 Visual Studio,必须使用具有管理权限的帐户登录。To install, update, or modify Visual Studio, you must log on with an account that has administrative permissions. 有关详细信息,请参阅用户权限与 Visual StudioFor more information, see User permissions and Visual Studio.

备注

以下过程假定你具有 Internet 连接。The following procedures assume that you have an internet connection.

有关如何修改先前创建的 Visual Studio 脱机安装的详细信息,请参阅更新基于网络的 Visual Studio 安装页和控制对基于网络的 Visual Studio 部署的更新页。For more information about how to modify a previously created offline installation of Visual Studio, see both the Update a network-based installation of Visual Studio page and the Control updates to network-based Visual Studio deployments page.

打开 Visual Studio 安装程序Open the Visual Studio Installer

  1. 在计算机上找到 Visual Studio 安装程序。Find the Visual Studio Installer on your computer.

    例如,在运行 Windows 10 的计算机上,选择“开始”,然后滚动到字母“V”,它作为“Visual Studio 安装程序”在那里列出 。For example, on a computer running Windows 10, select Start, and then scroll to the letter V, where it's listed as Visual Studio Installer.

    Visual Studio 安装程序Visual Studio Installer

    提示

    对于某些计算机,Visual Studio 安装程序可能列在字母 “M” 下,即 Microsoft Visual Studio 安装程序On some computers, the Visual Studio Installer might be listed under the letter "M" as the Microsoft Visual Studio Installer.

    或者,可以在以下位置找到 Visual Studio 安装程序:C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exeAlternatively, you can find the Visual Studio Installer in the following location: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe

  2. 打开安装程序,然后选择“修改” 。Open the installer, and then choose Modify.

    启动或修改 Visual StudioLaunch or modify Visual Studio

    重要

    如果还有更新挂起,则“修改”按钮会出现在其他位置。If you have an update pending, the Modify button is in a different place. 这样一来,如果选择执行此操作,可以在不更新的情况下修改 Visual Studio。This way, you can modify Visual Studio without updating it, should you choose to do so. 单击“更多”,然后选择“修改” 。Click More, and then choose Modify.

    更新或修改 Visual StudioUpdate or modify Visual Studio

  1. 在计算机上找到 Visual Studio 安装程序。Find the Visual Studio Installer on your computer.

    例如,在运行 Windows 10 的计算机上,选择“开始”,然后滚动到字母“V”,它作为“Visual Studio 安装程序”在那里列出 。For example, on a computer running Windows 10, select Start, and then scroll to the letter V, where it's listed as Visual Studio Installer.

    在 Windows 中打开 Visual Studio 安装程序Open the Visual Studio Installer from Windows

    备注

    还可以在以下位置中找到 Visual Studio 安装程序:You can also find the Visual Studio Installer in the following location:

    C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe

    可能需要先更新安装程序,然后才能继续操作。You might have to update the installer before continuing. 如果是这样,请按照提示操作。If so, follow the prompts.

  2. 在安装程序中,查找已安装的 Visual Studio 版本,然后选择“修改” 。In the installer, look for the edition of Visual Studio that you installed, and then choose Modify.

    更新或修改 Visual StudioUpdate or modify Visual Studio

    重要

    如果还有更新挂起,则“修改”按钮会出现在其他位置。If you have an update pending, the Modify button is in a different place. 这样一来,如果需要的话,可以在不更新的情况下修改 Visual Studio。This way, you can modify Visual Studio without updating it, should you want to. 选择“更多” ,然后选择“修改” 。Choose More, and then choose Modify.

    更新或修改 Visual StudioUpdate or modify Visual Studio

修改工作负载Modify workloads

工作负载包含所用编程语言或平台必需的功能。Workloads contain the features you need for the programming language or platform that you're using. 可以使用工作负载来修改 Visual Studio,以便在需要执行某项操作时为其提供支持。Use workloads to modify Visual Studio so that it supports the work you want to do, when you want to do it.

  1. 在 Visual Studio 安装程序中,选择“工作负载” 选项卡,然后选择或取消选择所需的工作负载。In the Visual Studio Installer, choose the Workloads tab, and then select or deselect the workloads that you want.

    Visual Studio 2017 安装对话框Visual Studio 2017 setup dialog

  2. 选择是要接受默认的“下载时安装”选项还是“全部下载后再安装”选项 。Choose whether you want to accept the default Install while downloading option or the Download all, then install option.

    Visual Studio 2017 安装选项Visual Studio 2017 setup options

    如果想要先下载稍后再安装,则“全部下载后再安装”选项很有用。The "Download all, then install" option is handy if you want to download first and then install later.

  3. 选择“修改” 。Choose Modify.

  4. 安装完新的工作负载后,从 Visual Studio 安装程序中选择“启动” 以打开 Visual Studio。After the new workloads are installed, choose Launch from the Visual Studio Installer to open Visual Studio.

工作负载包含所用编程语言或平台必需的功能。Workloads contain the features you need for the programming language or platform that you're using. 可以使用工作负载来修改 Visual Studio,以便在需要执行某项操作时为其提供支持。Use workloads to modify Visual Studio so that it supports the work you want to do, when you want to do it.

提示

若要详细了解开发所需的工具和组件捆绑包,请参阅 Visual Studio 工作负荷For more information about which tool and component bundles you need for development, see Visual Studio workloads.

  1. 在 Visual Studio 安装程序中,选择“工作负载” 选项卡,然后选择或取消选择所需的工作负载。In in the Visual Studio Installer, choose the Workloads tab, and then select or deselect the workloads that you want.

    Visual Studio 2019 安装对话框Visual Studio 2019 setup dialog

  2. 选择是要接受默认的“下载时安装”选项还是“全部下载后再安装”选项 。Choose whether you want to accept the default Install while downloading option or the Download all, then install option.

    Visual Studio 2019 安装选项Visual Studio 2019 setup options

    如果想要先下载稍后再安装,则“全部下载后再安装”选项很有用。The "Download all, then install" option is handy if you want to download first and then install later.

  3. 选择“修改” 。Choose Modify.

  4. 安装完新的工作负载后,从 Visual Studio 安装程序中选择“启动” 以打开 Visual Studio。After the new workloads are installed, choose Launch from the Visual Studio Installer to open Visual Studio.

修改各个组件Modify individual components

如果不想使用工作负载来自定义 Visual Studio 安装,请从 Visual Studio 安装程序中选择“单个组件” 选项卡,选择所需组件,然后按提示操作。If you don't want to use workloads to customize your Visual Studio installation, choose the Individual Components tab in the Visual Studio Installer, select the components you want, and then follow the prompts.

提示

有关 SQL Server Data Tools (SSDT) 组件的信息,请参阅下载并安装 SSDT for Visual StudioFor information about the SQL Server Data Tools (SSDT) component, see Download and install SSDT for Visual Studio.

修改语言包Modify language packs

默认情况下,安装程序首次运行时会匹配操作系统语言。By default, the installer matches the language of the operating system when it runs for the first time. 不过,你可以随时更改语言。However, you can change the language whenever you want. 为此,请在 Visual Studio 安装程序中选择“语言包” 选项卡,选择所需的语言,然后按照提示进行操作。To do so, choose the Language packs tab in the Visual Studio Installer, select the language you prefer, and then follow the prompts.

获取支持Get support

有时,你难免遇到一些问题。Sometimes, things can go wrong. 如果 Visual Studio 安装失败,请参阅 Visual Studio 安装和升级问题疑难解答获取分步指南。If your Visual Studio installation fails, see Troubleshoot Visual Studio installation and upgrade issues for step-by-step guidance.

对于安装相关问题,我们还提供安装聊天(仅限英语)支持选项 。We also offer an installation chat (English only) support option for installation-related issues.

下面是另外几个支持选项:Here are a few more support options:

另请参阅See also