This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Download Microsoft Edge
More info about Internet Explorer and Microsoft Edge
Applies to:
Visual Studio
Visual Studio for Mac
Visual Studio Code
GitHub Copilot
is 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 helps developers write code more efficiently, reduce the time spent on repetitive tasks, and minimize errors.
This article was partially created with the help of artificial intelligence. Before publishing, a human author reviewed and revised the content as needed. See
Our principles for using AI-generated content in Microsoft Learn
.
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.
How GitHub Copilot compares to IntelliSense and IntelliCode
Here's a detailed look at what each technology can do for you:
IntelliSense
is a code completion feature built-in to Visual Studio, which provides suggestions based on the current context. Such suggestions include variable names, functions, and classes. IntelliSense is language-specific and works with a limited set of programming languages.
IntelliCode
is an extension for Visual Studio that uses AI to provide more intelligent
whole line completions
based on patterns found in your codebase. It goes beyond IntelliSense by analyzing your code to understand common practices and recommend suggestions accordingly.
GitHub Copilot
is an AI-powered code completion extension for Visual Studio that leverages a vast dataset of publicly available code to provide context-aware code suggestions, snippets, and even entire functions. It works with many programming languages and offers more advanced assistance compared to IntelliCode and IntelliSense.
While all three aim to improve developer productivity, GitHub Copilot stands out with its ability to understand the context of your code and provide more accurate and relevant suggestions.
Supported programming languages
GitHub Copilot supports several programming languages and frameworks, including but not limited to: C#, C++, and Python.
Requirements
To get started, all you need is Visual Studio 2022
version 17.4.4
or later, and a GitHub Copilot
subscription
.
GitHub Copilot is free for verified students and for maintainers of popular open source projects on GitHub.
Installation instructions
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.
After installation, you can start using GitHub Copilot by typing code in the editor and observing the suggestions provided by AI.
Future features
GitHub Copilot is continuing to evolve; to find out more about the new experience that's coming soon, see the
GitHub Copilot chat for Visual Studio 2022
and the
IntelliSense list in Visual Studio 2022 can now steer GitHub Copilot code completions
blog posts.
Next steps
To learn more about the current GitHub Copilot extension for Visual Studio, consider exploring the following resources:
GitHub Copilot extension: Getting started
GitHub Copilot: Your AI pair programmer