What is the GitHub Copilot extension for Visual Studio?
Applies to: Visual Studio Visual Studio for Mac Visual Studio Code
In this article, you'll learn about the Copilot extension, an AI-powered pair programmer extension for Visual Studio that provides you with context-aware code completions, suggestions, and even entire code snippets. This powerful tool aids [AI-assisted development in Visual Studio] and helps developers write code more efficiently, reduce the time spent on repetitive tasks, and minimize errors.
For more information on the GitHub Copilot Chat extension in Visual Studio, see About the GitHub Copilot Chat extension for Visual Studio.
How GitHub Copilot works
GitHub Copilot works by utilizing advanced machine learning models trained on a vast dataset of publicly available code from GitHub repositories. As you type code, the AI analyzes the context and provides relevant suggestions in real-time. You can receive suggestions also by writing a natural language comment describing what you want the code to do.
You can also use GitHub Copilot to convert comments to code, create unit tests, create SQL queries, and more.
Exploring GitHub Copilot
To see GitHub Copilot in action, check out the following video tutorial.
Video length: 1.19 minutes
Prerequisites & supported programming languages
To get started, you need:
Visual Studio 2022 version 17.4.4 or later
a GitHub Copilot subscription.
GitHub Copilot is free for verified students and for maintainers of popular open source projects on GitHub.
GitHub Copilot supports several programming languages and frameworks, including but not limited to: C#, C++, and Python.
Open Visual Studio.
On the menu bar, select Extensions > Manage Extensions.
In the Search box, enter "GitHub Copilot".
Select the GitHub Copilot extension, and then select the Download button.
Restart Visual Studio to complete the installation process.
For more information about activation & authorization, see the Installing the Visual Studio extension section in GitHub Docs.
After installation, you can start using GitHub Copilot by typing code in the editor and observing the suggestions provided by AI.
To learn more about the current GitHub Copilot extension for Visual Studio, consider exploring the following resources: