{"id":57112,"date":"2025-06-12T10:05:00","date_gmt":"2025-06-12T17:05:00","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet\/?p=57112"},"modified":"2025-06-13T15:12:27","modified_gmt":"2025-06-13T22:12:27","slug":"improve-productivity-with-github-copilot-dotnet","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/improve-productivity-with-github-copilot-dotnet\/","title":{"rendered":"Improve Your Productivity with New GitHub Copilot Features for .NET!"},"content":{"rendered":"<p>The <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/visual-studio-2022-v17-14-is-now-generally-available\/\">Visual Studio 17.14 GA release<\/a> and recent <a href=\"https:\/\/learn.microsoft.com\/visualstudio\/subscriptions\/vs-c-sharp-dev-kit\">C# Dev Kit<\/a> releases for VS Code have introduced a whole new batch of GitHub Copilot features designed to make your .NET development experience a more efficient and delightful one! Let\u2019s look at some of the latest updates!<\/p>\n<h2>Agent mode, MCP, and more<\/h2>\n<p>The overall AI assisted development experience has seen huge improvements recently. From agent mode in <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/agent-mode-has-arrived-in-preview-for-visual-studio\/\">Visual Studio<\/a>, <a href=\"https:\/\/code.visualstudio.com\/blogs\/2025\/04\/07\/agentMode\">VS Code<\/a>, and <a href=\"https:\/\/devblogs.microsoft.com\/blog\/agent-mode-for-every-developer\">other editors<\/a> to <a href=\"https:\/\/code.visualstudio.com\/blogs\/2025\/05\/12\/agent-mode-meets-mcp\">MCP support<\/a> to <a href=\"https:\/\/code.visualstudio.com\/blogs\/2025\/02\/12\/next-edit-suggestions\">next edit suggestions<\/a> and beyond. Each of these features was designed to boost your day to day development experience with your powerful pair programmer copilot.<\/p>\n<p><iframe title=\"Say Hello to Agent Mode, MCP, &amp; NES in Visual Studio\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/5bBQAgfE890?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<h2>Improved Context Awareness in VS and VS Code<\/h2>\n<p>Have you ever received a code suggestion from GitHub Copilot that seems to be unaware of your project and doesn\u2019t reflect your codebase? The .NET team is addressing this issue by providing added context to GitHub Copilot for each query, now available in Visual Studio 17.14 and VS Code with C# Dev Kit. It will now scan your code for supported coding scenarios that Copilot can store for better context, resulting in more consistent, relevant responses. Supported scenarios include the following:<\/p>\n<ul>\n<li>If overriding a method or implementing an interface member, locate an example from a sibling type.<\/li>\n<li>If in a method body, locate a caller as an example for how the method is used.<\/li>\n<li>If in a member access context and can confidently resolve it to a symbol, find other references to this symbol and return code around it as an example.<\/li>\n<\/ul>\n<p>We\u2019ll be adding more scenarios to the context awareness provider soon!<\/p>\n<h2>Microsoft Learn Integration for Up-to-Date Responses in VS<\/h2>\n<p>.NET is constantly being updated and improved on\u2026but the models used by Copilot are trained using data from a certain point in time. When you ask Copilot questions about something that was released after the model was trained, it can provide you with unverified or out-of-date information. With the new MS Learn Integration, now available in VS 17.14, when you ask Copilot about a topic it doesn\u2019t know, it will pull info from existing <a href=\"https:\/\/learn.microsoft.com\/\">MS Learn docs<\/a> to provide you with the most up to date information!<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/06\/mslearn-before-after.png\" alt=\"Images of Copilot responses with MSLearn integration disabled (left) or enabled (right)\" \/><\/p>\n<p>To enable this feature, go to <strong>Tools &gt; Options &gt; Copilot &gt; Feature Flags &gt; Enable Microsoft Learn Function<\/strong> in chat. You&#8217;ll also need to be logged in with a Microsoft account in VS to use this feature, but GitHub authentication support is on the way!<\/p>\n<h2>Implement Your Methods with Copilot in VS<\/h2>\n<p>Two popular refactorings many .NET developers use are <strong>Implement Method<\/strong> and <strong>Implement Interface<\/strong>, both of which let you automatically generate methods that are referenced but not implemented yet. In VS 17.14, once you\u2019ve used the one of these refactorings, you can select the lightbulb (<code>CTRL + .<\/code>), and choose the new <strong>Implement with Copilot<\/strong> refactoring, which will add the body to your method!<\/p>\n<p><iframe width=\"800\" height=\"450\" src=\"https:\/\/www.youtube.com\/embed\/1qj-LXeFQ5k?si=Y2pBGK84LH72RsXN\" allowfullscreen><\/iframe><\/p>\n<h2>On-the-Fly Documentation in VS<\/h2>\n<p>Sometimes, you are scrolling through code that you didn\u2019t write or need a refresher on, and you just want a quick description of the variable, method, or class and what it does. Now, when you hover over a variable, method, or class and pull up its Quick Info tooltip in VS, you will see an option to <strong>Describe with Copilot<\/strong>. If you select that option, you will receive a Copilot-generated summary of that element for as long as you hover over it. This gives you a quick and temporary way to view information about your codebase.<\/p>\n<p><div style=\"width: 640px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-57112-1\" width=\"640\" height=\"360\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/06\/On-the-fly-docs.mp4?_=1\" \/><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/06\/On-the-fly-docs.mp4\">https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/06\/On-the-fly-docs.mp4<\/a><\/video><\/div><\/p>\n<h2>Auto-Generate Documentation Comments in VS<\/h2>\n<p>If you want more permanent comments for your classes and methods, GitHub Copilot does that work for you! In VS 17.14, when you add the doc comment notation (<code>\/\/\/<\/code>) to the top of your class or method, GitHub Copilot will generate the full comment, complete with summary and descriptions for each parameter! This will appear as ghost text. Just hit tab to accept it!<\/p>\n<p><div style=\"width: 640px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-57112-2\" width=\"640\" height=\"360\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/06\/Generate-doc-comments.mp4?_=2\" \/><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/06\/Generate-doc-comments.mp4\">https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/06\/Generate-doc-comments.mp4<\/a><\/video><\/div><\/p>\n<h2>Summary<\/h2>\n<p>We\u2019ve introduced a lot of Copilot-powered features to improve your productivity, and we want to hear your feedback on how we can make them even better! Please try them all out, share your feedback in the <a href=\"https:\/\/developercommunity.visualstudio.com\/home\">Developer Community<\/a>, and stay tuned for even more updates!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We recently introduced several new GitHub Copilot-powered .NET experiences designed to help you be more productive.  Take a look!<\/p>\n","protected":false},"author":651,"featured_media":57113,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[685,7781,756,646,7593],"tags":[63,7869,147,7578],"class_list":["post-57112","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","category-ai","category-csharp","category-visual-studio","category-visual-studio-code","tag-dotnet","tag-github-copilot","tag-visual-studio","tag-vs-code"],"acf":[],"blog_post_summary":"<p>We recently introduced several new GitHub Copilot-powered .NET experiences designed to help you be more productive.  Take a look!<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/57112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/651"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=57112"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/57112\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/57113"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=57112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=57112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=57112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}