Visual Studio 2022 version 17.6 for C++ Developers
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 Visual Studio downloads page or upgrade your existing installation by following the Update Visual Studio Learn page.
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.
We’ve 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.
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. You can learn more about this feature in our Create C++ Member Function in Visual Studio blog post.
We made improvements to the Solution – 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.
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 Even faster builds with Incredibuild 10 and Visual Studio 17.6 Preview 3 blog post.
We have added initial support for C++20 mode in C++/CLI projects. All C++20 headers can be
#included in a
/clr compilation without restrictions. You can find out more details in our C++20 Support for C++/CLI blog post.
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 Microsoft STL GitHub page. Here are some highlights:
- P2505R5 Monadic Functions for
- Activated the vectorized implementations of
ranges::count()for more scenarios involving pointer elements.
- Added visualizers for
- Improved the output of
source_location::function_name(). It now includes both function parameter types and template arguments.
Visual Studio 2022 version 17.6 comes with built-in support for HLSL and a new tool to view Unreal Engine logs.
HLSL (High Level Shading Language) is a DirectX-specific programming language used to create shaders in game development and rendering applications. The popular HLSL Tools extension by Tim Jones 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 “Game development with C++” or “Game development with Unity” workload in the Visual Studio Installer.
The Unreal Engine Log viewer is available at View > Other Windows > Unreal Engine Log. To filter your logs, click on the “Categories” or “Verbosity” dropdowns.
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 “IDE support for Unreal Engine” component is enabled in the “Game development for C++” workload in the VS Installer.
If you use STM32CubeIDE projects, you can now import these directly into Visual Studio! Selecting File > Open > Import STM32CubeIDE project will generate a CMake project with device flashing and debugging settings for STLink.
To use this feature you must have the STM32CubeIDE installed with the board support package for your device.
If your project has an .ioc file you can open the context menu and open STM32CubeMX for your project.
You can find out more about this feature in our Importing ST projects into Visual Studio blog post.
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—both 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.
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 Xbox support for vcpkg.
Find out more in our vcpkg Package Manager is Now Included with Visual Studio blog post!
Send us your feedback!
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 Developer Community. You can also reach us on Twitter (@VisualC), or via email at email@example.com.