{"id":252739,"date":"2025-03-17T08:00:10","date_gmt":"2025-03-17T15:00:10","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=252739"},"modified":"2025-03-21T15:36:35","modified_gmt":"2025-03-21T22:36:35","slug":"introducing-automatic-documentation-comment-generation-in-visual-studio","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/introducing-automatic-documentation-comment-generation-in-visual-studio\/","title":{"rendered":"Introducing automatic documentation comment generation in Visual Studio"},"content":{"rendered":"<p>We are excited to announce that Copilot is now automatically integrated into Visual Studio\u2019s editor to help you generate doc comments for functions. This new feature aims to streamline your documentation process and enhance your coding experience.<\/p>\n<p>To access these updates, you will need a GitHub Copilot subscription. If you don\u2019t already have GitHub Copilot, you can sign up for free\u00a0<a href=\"https:\/\/github.com\/settings\/copilot\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n<h1>AI doc comment generation<\/h1>\n<p>If you have automatic doc comment generation enabled via your settings, you can simply type what would trigger your doc comment format (such as \/\/\/) and Copilot suggestions will automatically fill out the function description based on the contents of the function, including a summary and any parameters and return types (if available). You can then accept these suggestions using a single tab, just like regular Copilot code completions.<\/p>\n<h1><img decoding=\"async\" class=\"alignnone wp-image-252747\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/03\/a-computer-screen-shot-of-a-computer-code-ai-gene-2.gif\" alt=\"Gif showcasing copilot generating a summary in the comments\" width=\"768\" height=\"295\" \/><\/h1>\n<h1>How to enable doc comments<\/h1>\n<p>To access this feature, you will need to have automatically generating doc comments enabled.<\/p>\n<p>For C++ projects, you can configure the generated documentation comment styles using the following setting in <strong>Tools &gt; Options. <\/strong>Both XML and Doxygen style comments are supported by this feature.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-252748\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/03\/word-image-252739-2-2.png\" alt=\"Tools &gt; Option, Coding Style, General to enable for C++\" width=\"871\" height=\"585\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/03\/word-image-252739-2-2.png 871w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/03\/word-image-252739-2-2-300x201.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/03\/word-image-252739-2-2-768x516.png 768w\" sizes=\"(max-width: 871px) 100vw, 871px\" \/><\/p>\n<p>For C#, you would need to enable the following setting in your <strong>Tools &gt; Options<\/strong><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-252749\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/03\/word-image-252739-3-2.png\" alt=\"Tools &gt; Option, C#, Advanced, Comments for C#\" width=\"817\" height=\"551\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/03\/word-image-252739-3-2.png 817w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/03\/word-image-252739-3-2-300x202.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/03\/word-image-252739-3-2-768x518.png 768w\" sizes=\"(max-width: 817px) 100vw, 817px\" \/><\/p>\n<h2>Share your feedback<\/h2>\n<p>This feature is available for Visual Studio 17.14 Preview 2 for both C# and C++ project files. We encourage you to explore this feature and see how GitHub Copilot can transform and simplify your coding experience.<\/p>\n<p>We deeply appreciate the continuous <a href=\"https:\/\/developercommunity.microsoft.com\/VisualStudio\">feedback<\/a> from our users, which drives us to improve and innovate. Your input is invaluable in making Visual Studio better with each update. Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are excited to announce that Copilot is now automatically integrated into Visual Studio\u2019s editor to help you generate doc comments for functions. This new feature aims to streamline your documentation process and enhance your coding experience. To access these updates, you will need a GitHub Copilot subscription. If you don\u2019t already have GitHub Copilot, [&hellip;]<\/p>\n","protected":false},"author":85413,"featured_media":252800,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[6888,6963,155],"tags":[6883,6039],"class_list":["post-252739","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-copilot","category-productivity","category-visual-studio","tag-copilot","tag-docs"],"acf":[],"blog_post_summary":"<p>We are excited to announce that Copilot is now automatically integrated into Visual Studio\u2019s editor to help you generate doc comments for functions. This new feature aims to streamline your documentation process and enhance your coding experience. To access these updates, you will need a GitHub Copilot subscription. If you don\u2019t already have GitHub Copilot, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/252739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/85413"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=252739"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/252739\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/252800"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=252739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=252739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=252739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}