Skip to content

Latest commit

 

History

History
153 lines (98 loc) · 10.6 KB

visual-studio-github-copilot-install-and-states.md

File metadata and controls

153 lines (98 loc) · 10.6 KB
title description ms.date ms.topic author ms.author ms.manager ms.subservice ms.collection monikerRange ms.custom
Install and manage GitHub Copilot in Visual Studio
Learn how to install GitHub Copilot to get GitHub Copilot Completions and Chat in Visual Studio. Use the Copilot badge in the IDE to access options to manage or troubleshoot your Copilot state.
9/12/2024
install-set-up-deploy
anandmeg
meghaanand
mijacobs
ai-tools
ce-skilling-ai-copilot
>= vs-2022
copilot-learning-hub

Install GitHub Copilot in Visual Studio

GitHub Copilot Completions and GitHub Copilot Chat in Visual Studio enable enhanced AI-assisted development in Visual Studio, helping you be more productive and efficient when writing code.

In this article, you learn how to install GitHub Copilot in Visual Studio. If you're using Visual Studio 2022 version 17.10 or later, you learn to use the Copilot badge in the IDE to manage your Copilot state.

Get GitHub Copilot for Visual Studio 2022 version 17.10 or later

With Visual Studio 2022 version 17.10, GitHub Copilot and GitHub Copilot Chat are available to install as a single experience that combines both Copilot and Copilot Chat into one package. The unified GitHub Copilot experience is included as a built-in, recommended component by default in all workloads and is available through the Visual Studio Installer.

To get the new unified GitHub Copilot experience:

  • Install Visual Studio 2022 version 17.10 or later.
  • Select at least one workload in the installer. Make sure to leave the preselected component GitHub Copilot selected. OR If no workload is selected, install GitHub Copilot by selecting it from Individual components in the installer.

GitHub Copilot is installed by default with all workloads. If you choose to exclude it, you can install it later by using the Visual Studio Installer to modify your installation, and selecting the GitHub Copilot component.

Get GitHub Copilot for Visual Studio 2022 versions 17.8 to 17.9

In Visual Studio 2022 versions 17.8 to 17.9, GitHub Copilot and GitHub Copilot Chat are available to install as two separate extensions.

Note

Installing GitHub Copilot extension is a prerequisite to installing GitHub Copilot Chat.

Install GitHub Copilot

You can get the GitHub Copilot extension in one of the following ways:

Install GitHub Copilot Chat

You can get the GitHub Copilot Chat extension in one of the following ways:

Support for GitHub Copilot Chat will be provided by GitHub and can be reached at https://support.github.com.

Install using the Visual Studio Installer

  1. Launch the Visual Studio Installer.

  2. Select the installation of Visual Studio you want to modify, and then select Modify.

  3. Select any workload, for example, .NET desktop development.

  4. Select GitHub Copilot from the list of Optional components, and then select Modify to install the extension.

    :::image type="content" source="media/vs-2022/visual-studio-github-copilot-extension/github-copilot-installer-component.png" alt-text="Screenshot that shows using the Visual Studio Installer to install the GitHub Copilot component." lightbox="media/vs-2022/visual-studio-github-copilot-extension/github-copilot-installer-component.png":::

    [!NOTE] In versions 17.9 or earlier, you'll use the Manage Extensions dialog to manage updates to the GitHub Copilot extension.

Install using the Manage Extensions dialog box

  1. Open Visual Studio.
  2. On the menu bar, select Extensions > Manage Extensions.
  3. In the Search box, enter "GitHub Copilot" or "GitHub Copilot Chat".
  4. Select the extension, and then select the Download button.
  5. Restart Visual Studio to complete the installation process.

Note

For more information about activation & authorization, see the Installing the Visual Studio extension section in GitHub Docs.

Install from Visual Studio Marketplace

Download and install the extensions directly from Visual Studio Marketplace.

Manage your Copilot state

With Visual Studio 2022 version 17.10, you see a Copilot status icon in the upper-right corner of the Visual Studio environment that indicates if Copilot is active, inactive, unavailable, or not installed. Using the dropdown menu from the status icon, you can easily access options that help manage or troubleshoot your Copilot state. Some options are available or greyed out depending on your Copilot state.

Note

Note that the status icon is moving from the bottom panel of the Visual Studio editor.

Copilot is active

Copilot is in an active state and fully functional if you signed into Visual Studio with a GitHub account that has an active subscription to GitHub Copilot for Individuals or GitHub Copilot for Business.

Using the dropdown menu, you can easily open the Chat window, access Copilot settings, and manage Copilot subscription.

:::image type="content" source="media/vs-2022/visual-studio-github-copilot-install-and-states/copilot-state-active.png" alt-text="Screenshot of Copilot badge when Copilot is in active state.":::

Copilot is inactive

If Copilot is installed but in an inactive state, it may be because:

  • you're not yet signed into Visual Studio with a GitHub account
  • your signed in GitHub account doesn't have an active Copilot subscription

Select Add GitHub Account with a Copilot Subscription in the dropdown from the status icon to open Account Settings and sign in with a GitHub account that has an active subscription to use Copilot. When you're signed in, the Copilot status icon updates to active.

:::image type="content" source="media/vs-2022/visual-studio-github-copilot-install-and-states/copilot-state-inactive.png" alt-text="Screenshot of Copilot badge when Copilot is in an inactive state.":::

If Copilot is inactive as the signed in GitHub account credentials need to be refreshed, select Refresh your GitHub credentials from the dropdown to refresh your GitHub account and sign in again.

If Copilot is disabled by your administrator, contact your IT administrator to learn more.

Copilot is unavailable

If Copilot is installed but unavailable for use, it may be due to network connectivity issues, server-side technical problems, or an expired service plan. In this state, Copilot doesn't provide its usual services until the external issues are resolved.

Select Copilot is unreachable in the dropdown menu to open the Troubleshooting page on diagnosing and resolving common network errors with GitHub Copilot. When the issue is resolved and you're signed in with an active subscription, the Copilot status icon updates to active.

:::image type="content" source="media/vs-2022/visual-studio-github-copilot-install-and-states/copilot-state-unavailable.png" alt-text="Screenshot of Copilot badge when Copilot is unavailable.":::

Copilot not installed

If you chose to opt out of the default recommended install by unchecking the GitHub Copilot component in the installer, the status icon is still available in the IDE.

Select Install Copilot from the dropdown to install Copilot. If you choose to not install Copilot, you can select Hide Copilot from the dropdown to hide the Copilot status icon from the IDE.

:::image type="content" source="media/vs-2022/visual-studio-github-copilot-install-and-states/copilot-state-not-installed.png" alt-text="Screenshot of Copilot badge when Copilot isn't installed.":::

Disable Copilot

Hide Copilot badge

You can hide the GitHub Copilot badge in the Visual Studio IDE by unselecting Tools > Options > Environment > Hide Copilot menu badge.

:::image type="content" source="media/vs-2022/visual-studio-github-copilot-install-and-states/hide-copilot-badge.png" alt-text="Screenshot of option to hide copilot badge in Tools > Options.":::

Uninstall Copilot

You can remove the GitHub Copilot component from your Visual Studio instance by using the Visual Studio Installer.

  1. Launch the Visual Studio Installer by selecting Tools > Get Tools and Features.
  2. Select Individual components.
  3. Type "copilot" in the search box.
  4. Uncheck GitHub Copilot and select Modify.
  5. Restart Visual Studio, and select Hide Copilot from the Copilot status icon dropdown to hide the badge.

Next steps

To learn more, consider exploring the following resources: