前言
今天大姚给大家分享一个好消息,GitHub Copilot 可以免费使用了!在此之前若开发者要使用 GitHub Copilot 需要付费订阅,每月订阅费用起步价为 10 美元,而经过验证的学生、教师和开源项目维护者则可以申请免费使用。今天咱们一起来看看在 Visual Studio 使用 GitHub Copilot 有多么的智能,是否真的能够提高.NET开发工作效率。
GitHub Copilot介绍
GitHub Copilot is an AI coding assistant that helps you code faster and with less effort so you can focus more on problem solving and collaboration.
What features are included in GitHub Copilot Free?
- Monthly 2000 code completions to help developers get their code done quickly.
- 50 chat message requests per month, support for asking programming questions, explaining existing code and finding bugs.
- Supports editing across multiple files in Visual Studio Code and Visual Studio.
- 支持在 Visual Studio Code、Visual Studio、JetBrains IDEs respond in singing upper Copilot Chat function。
- Supports code completion in Visual Studio Code, Visual Studio, JetBrains IDEs, Vim/Neovim, Xcode and Azure Data Studio.
GitHub Copilot Supported Languages
Support for Python, JavaScript, TypeScript, Ruby, Go, C# and C++.
Install the latest version of Visual Studio 2022
The latest experience with GitHub Copilot is now integrated into Visual Studio and combines GitHub Copilot's Code Completion and GitHub Copilot Chat features into one convenient package. Download the latest Visual Studio 2022 to discover the new features and improvements.
Visual Studio 2022 version 17.10 or later.
- Download Address:/zh-hans/downloads
Activate GitHub Copilot Free
Register or login to your GitHub account => Settings => Copilot => Click Start using Copilot Free.
Start using Copilot for free in Visual Studio
Add a GitHub account:
Copilot related settings in Visual Studio
Using Copilot Code Completion in Visual Studio
Using Copilot Code Generation in Visual Studio
The following demonstrates the code generation feature of GitHub Copilot in Visual Studio. If you choose to use the code, you can select Tab to insert it into the code file:
Inline Chat with Copilot in Visual Studio
Using shortcutsAlt+\
, for inline chat:
Summarizing my code with Copilot in Visual Studio
Writing Unit Tests with Copilot in Visual Studio
Modifying my code with Copilot in Visual Studio
Asking Questions with Copilot Chat Window in Visual Studio
More Visual Studio Programming Productivity Improvement Tips
- /YSGStudyHards/DotNetGuide
reference article
- /zh-cn/visualstudio/ide/ai-assisted-development-visual-studio?view=vs-2022
- /zh-hans/github-copilot