{"id":32176,"date":"2023-05-16T17:36:22","date_gmt":"2023-05-16T17:36:22","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=32176"},"modified":"2023-05-16T17:36:22","modified_gmt":"2023-05-16T17:36:22","slug":"visual-studio-17-6-for-cpp-devs","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/visual-studio-17-6-for-cpp-devs\/","title":{"rendered":"Visual Studio 2022 version 17.6 for C++ Developers"},"content":{"rendered":"<p>We are happy to announce that Visual Studio 2022 version 17.6 is now generally available! This post summarizes the new features you can find in this release for C++. You can download Visual Studio 2022 from the\u00a0<a href=\"https:\/\/visualstudio.microsoft.com\/downloads\/\">Visual Studio downloads page\u00a0<\/a>or upgrade your existing installation by following the\u00a0<a href=\"https:\/\/learn.microsoft.com\/visualstudio\/install\/update-visual-studio?view=vs-2022\">Update Visual Studio Learn page<\/a>.<\/p>\n<h2>Cross-Platform<\/h2>\n<p>You\u2019re used to debugging your C++ code with a lot of help from the IDE, but what about your build system? You can use the new CMake Debugger to debug your CMake scripts at configure time.<a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vs1-1.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-32179\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vs1-1.png\" alt=\"View of CMake D\" width=\"846\" height=\"667\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vs1-1.png 846w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vs1-1-300x237.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vs1-1-768x606.png 768w\" sizes=\"(max-width: 846px) 100vw, 846px\" \/><\/a><\/p>\n<p>You can set breakpoints based on filenames, line numbers, and when CMake errors are triggered, and can view call stacks of filenames and watch defined variables. Furthermore, the locals window will track CMake variables, targets, and tests.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc2.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-32180\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc2.png\" alt=\"Image vc2\" width=\"935\" height=\"406\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc2.png 935w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc2-300x130.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc2-768x333.png 768w\" sizes=\"(max-width: 935px) 100vw, 935px\" \/><\/a><\/p>\n<p>We\u2019ve added a new Remote File Explorer feature. With this you can browse, upload, and download files to your remote machine listed in the Connection Manager, directly from Visual Studio.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc3.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-32181\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc3.png\" alt=\"Remote file explorer window\" width=\"660\" height=\"466\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc3.png 660w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc3-300x212.png 300w\" sizes=\"(max-width: 660px) 100vw, 660px\" \/><\/a><\/p>\n<h2><\/h2>\n<p>You can now use the Create Member Function feature to quickly add constructors and equality operators to your classes. When you have a class with member data, three dots will appear under the class name, and hovering over them will display a screwdriver icon. The drop-down from the screwdriver icon will display the new member function suggestions. With this, you can add a default constructor, constructor with all fields, equality operator, and equality operator with all fields.\u00a0 You can learn more about this feature in our <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/create-c-member-function-in-visual-studio\/\">Create C++ Member Function in Visual Studio<\/a> blog post.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/items.gif\"><img decoding=\"async\" class=\"aligncenter wp-image-32192 size-full\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/items.gif\" alt=\"Create member function feature in action\" width=\"1280\" height=\"930\" \/><\/a><\/p>\n<p>We made improvements to the Solution &#8211; Close scenario, which makes closing a solution containing C++ projects faster. The overall perf improvements can make closing a solution in some cases from 20% faster for small codebases, to 50% faster in some cases for large solutions (1000+ projects). We expect the wins to be more noticeable in large projects. For Chromium, the improvements are typically 50% faster, saving 20 seconds of time.<\/p>\n<p>The Visual Studio Installer now lets you install Incredibuild 10, which comes with a host of new features, including new build cache technology, an improved license management system, and cloud optimization. You can find out more about these features and how you can use them in our <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/incredibuild-10-visual-studio-17-6\/\">Even faster builds with Incredibuild 10 and Visual Studio 17.6 Preview 3<\/a> blog post.<\/p>\n<h2>Conformance<\/h2>\n<p>We have added initial support for C++20 mode in C++\/CLI projects. All C++20 headers can be\u00a0<code>#included<\/code>\u00a0in a\u00a0<code>\/clr<\/code>\u00a0compilation without restrictions. You can find out more details in our <a href=\"https:\/\/aka.ms\/cpp20-cppcli\">C++20 Support for C++\/CLI blog post<\/a>.<\/p>\n<p>We continue to work on C++23 support in our standard library, as well as improving our support for existing standards. Many of these features have been contributed by you folks in the community: thank you! You can find the full changelist on the <a href=\"https:\/\/github.com\/microsoft\/STL\/wiki\/Changelog\">Microsoft STL GitHub page<\/a>. Here are some highlights:<\/p>\n<ul>\n<li><a href=\"https:\/\/wg21.link\/P1223R5\">P1223R5<\/a> <code>ranges::find_last<\/code>,\u00a0<code>ranges::find_last_if<\/code>,\u00a0<code>ranges::find_last_if_not<\/code><\/li>\n<li><a href=\"https:\/\/wg21.link\/P2321R2\">P2321R2<\/a> <code>views::zip_transform<\/code><\/li>\n<li><a href=\"https:\/\/wg21.link\/P2474R2\">P2474R2<\/a> <code>views::repeat<\/code><\/li>\n<li><a href=\"https:\/\/wg21.link\/P2505R5\">P2505R5 <\/a>Monadic Functions for\u00a0<code>expected<\/code><\/li>\n<li>Activated the vectorized implementations of\u00a0<code>find()<\/code>,\u00a0<code>count()<\/code>,\u00a0<code>ranges::find()<\/code>, and\u00a0<code>ranges::count()<\/code>\u00a0for more scenarios involving pointer elements.<\/li>\n<li>Added visualizers for\u00a0<code>error_category<\/code> and\u00a0<code>error_code<\/code>.<\/li>\n<li>Improved the output of\u00a0<code>source_location::function_name()<\/code>. It now includes both function parameter types and template arguments.<\/li>\n<\/ul>\n<h2>Game Development<\/h2>\n<p>Visual Studio 2022 version 17.6 comes with built-in support for HLSL and a new tool to view Unreal Engine logs.<\/p>\n<p>HLSL (High Level Shading Language) is a DirectX-specific programming language used to create shaders in game development and rendering applications. The popular <a href=\"https:\/\/github.com\/tgjones\/HlslTools\">HLSL Tools extension by Tim Jones<\/a> is now available as part of Visual Studio, providing syntax highlighting, statement completion, go-to-definition, and more! To use HLSL Tools, please enable the component in the &#8220;Game development with C++&#8221; or &#8220;Game development with Unity&#8221; workload in the Visual Studio Installer.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc6.png\"><img decoding=\"async\" class=\"aligncenter size-large wp-image-32185\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc6-1024x575.png\" alt=\"HLSL syntax highlighting\" width=\"640\" height=\"359\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc6-1024x575.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc6-300x169.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc6-768x432.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc6.png 1379w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>The Unreal Engine Log viewer is available at View &gt; Other Windows &gt; Unreal Engine Log. To filter your logs, click on the &#8220;Categories&#8221; or &#8220;Verbosity&#8221; dropdowns.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc7-1.png\"><img decoding=\"async\" class=\"aligncenter size-large wp-image-32187\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc7-1-1024x323.png\" alt=\"Unreal Engine Log viewer\" width=\"640\" height=\"202\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc7-1-1024x323.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc7-1-300x95.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc7-1-768x242.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc7-1.png 1449w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>Note that Unreal Engine integrations will only show up when you are working on an Unreal Engine project. To ensure these features are active, double check that the \u201cIDE support for Unreal Engine\u201d component is enabled in the \u201cGame development for C++\u201d workload in the VS Installer.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc5.png\"><img decoding=\"async\" class=\"aligncenter size-large wp-image-32184\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc5.png\" alt=\"Image vc5\" width=\"618\" height=\"629\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc5.png 618w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc5-295x300.png 295w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc5-24x24.png 24w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc5-48x48.png 48w\" sizes=\"(max-width: 618px) 100vw, 618px\" \/><\/a><\/p>\n<h2>Embedded<\/h2>\n<p>If you use <a href=\"https:\/\/www.st.com\/en\/development-tools\/stm32cubeide.html\">STM32CubeIDE<\/a> projects, you can now import these directly into Visual Studio! Selecting File &gt; Open &gt; Import STM32CubeIDE project will generate a CMake project with device flashing and debugging settings for STLink.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc8.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-32188\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc8.png\" alt=\"Image vc8\" width=\"444\" height=\"183\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc8.png 444w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc8-300x124.png 300w\" sizes=\"(max-width: 444px) 100vw, 444px\" \/><\/a><\/p>\n<p>To use this feature you must have the\u00a0STM32CubeIDE installed with the board support package for your device.<\/p>\n<p>If your project has an .ioc file you can open the context menu and open STM32CubeMX for your project.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc9.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-32189\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc9.png\" alt=\"Image vc9\" width=\"522\" height=\"288\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc9.png 522w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2023\/05\/vc9-300x166.png 300w\" sizes=\"(max-width: 522px) 100vw, 522px\" \/><\/a><\/p>\n<p>You can find out more about this feature in our <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/importing-st-projects-into-visual-studio\/\">Importing ST projects into Visual Studio<\/a> blog post.<\/p>\n<h2>vcpkg<\/h2>\n<p>As of Visual Studio 2022 version 17.6, vcpkg is now added by default for IDE installations that include C++ workloads. You can run vcpkg commands from a Developer Command Prompt for Visual Studio targeting a new version of the IDE\u2014both the ones embedded in the IDE as well as external terminals. Both the Developer Command Prompt and Developer PowerShell consoles are supported. You must run to configure the built-in copy of vcpkg as the one for use by the IDE and in order to enable MSBuild and CMake integration.<\/p>\n<p>vcpkg now supports targeting Xbox out of the box with four new community triplets. The appropriate triplet is automatically chosen when using the Gaming.Xbox.*.x64 custom platforms in the Microsoft GDK with Xbox Extensions via the vcpkg integrate functionality. This makes it easy for developers to build open-source dependencies for this platform. Thank you to Chuck Walbourn from the Xbox organization for preparing these triplets. You can read more about them in his blog post on <a href=\"https:\/\/walbourn.github.io\/vcpkg-now-supports-targeting-xbox\/\">Xbox support for vcpkg<\/a>.<\/p>\n<p>Find out more in our <a href=\"https:\/\/aka.ms\/vcpkg-VS-17.6\">vcpkg Package Manager is Now Included with Visual Studio<\/a> blog post!<\/p>\n<h2>Send us your feedback!<\/h2>\n<p>We are very much interested in your feedback to continue to improve this experience. The comments below are open. Feedback can also be shared through the\u00a0<a href=\"https:\/\/developercommunity.visualstudio.com\/cpp\">Developer Community<\/a>. You can also reach us on Twitter (<a href=\"https:\/\/twitter.com\/visualc\">@VisualC<\/a>), or via email at\u00a0<a href=\"mailto:visualcpp@microsoft.com\">visualcpp@microsoft.com<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are happy to announce that Visual Studio 2022 version 17.6 is now generally available! This post summarizes the new features you can find in this release for C++. You can download Visual Studio 2022 from the\u00a0Visual Studio downloads page\u00a0or upgrade your existing installation by following the\u00a0Update Visual Studio Learn page. Cross-Platform You\u2019re used to [&hellip;]<\/p>\n","protected":false},"author":706,"featured_media":32179,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-32176","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus"],"acf":[],"blog_post_summary":"<p>We are happy to announce that Visual Studio 2022 version 17.6 is now generally available! This post summarizes the new features you can find in this release for C++. You can download Visual Studio 2022 from the\u00a0Visual Studio downloads page\u00a0or upgrade your existing installation by following the\u00a0Update Visual Studio Learn page. Cross-Platform You\u2019re used to [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/32176","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/706"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=32176"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/32176\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/32179"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=32176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=32176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=32176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}