Visual Studio 2022 version 17.6 for C++ Developers

Sy Brand

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.

Cross-Platform

You’re 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.View of CMake D

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.

Image vc2

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.

Remote file explorer window

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.

Create member function feature in action

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.

Conformance

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:

  • P1223R5 ranges::find_lastranges::find_last_ifranges::find_last_if_not
  • P2321R2 views::zip_transform
  • P2474R2 views::repeat
  • P2505R5 Monadic Functions for expected
  • Activated the vectorized implementations of find()count()ranges::find(), and ranges::count() for more scenarios involving pointer elements.
  • Added visualizers for error_category and error_code.
  • Improved the output of source_location::function_name(). It now includes both function parameter types and template arguments.

Game Development

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.

HLSL syntax highlighting

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.

Unreal Engine Log viewer

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.

Image vc5

Embedded

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.

Image vc8

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.

Image vc9

You can find out more about this feature in our Importing ST projects into Visual Studio blog post.

vcpkg

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 visualcpp@microsoft.com.

Posted in C++

8 comments

Comments are closed. Login to edit/delete your existing comments

  • Paulo Pinto 0

    The “vcpkg Package Manager is Now Included with Visual Studio” link is bronken, it points to nowhere.

    Other than that, thanks for the improvements. Still looking forward to C++/WinRT tooling catching up to what we lost with C++/CX deprecation though.

    • Augustin PopaMicrosoft employee 0

      Sorry about that, the vcpkg blog post will be published later this week. That link should work then.

      • deadpin 0

        Yes 17.7 preview 1 seems much better behaved with Blender, but ideally the fix will be made to 17.6 since that is LTS.

  • Arda Kolcak 0

    Navigator on top of file is archaic. You have to click 3 times to go to a function (if you know which scope that func is in).

    Please add a visual assist/resharper style navigator to easily go to a function or variable def.

    • Paulo Pinto 0

      I seldom use it, Ctrl+T or Ctrl+, does the job indexing and going straight to the desired symbol.

  • Alex Syniakov 0

    And modules still produce tons of ICEs….

Feedback usabilla icon