What’s New for C++ Developers in Visual Studio 2022 17.7

What’s New for C++ Developers in Visual Studio 2022 17.7

Sy Brand

We are happy to announce that Visual Studio 2022 version 17.7 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.

Core Editor

Comparing Files

You no longer need to leave Visual Studio and rely on other tools to compare files. Now you can easily compare any file in Solution Explorer with other files by either:

  • Right-clicking on a single file, selecting “Compare With…” from the context menu which will bring up File Explorer. Navigating to any file on disk and selecting it for comparison.
  • Multi-selecting two files by holding down Ctrl then right-clicking and selecting “Compare Selected” from the context menu.

A screenshot of a computer program Description automatically generated

Please share your feedback here.  We’d love to hear your thoughts on this new experience.

Copy and Trim Indentation

If you have ever copied code from Visual Studio to another application (Outlook, Teams, Slack, etc.) and found that your code indentation has not been copied correctly, you will find that this new capability fixes that for you. Visual Studio now automatically fixes indentation for you when you copy code from Visual Studio and paste it in another application.

A screenshot of a computer screen Description automatically generated

Parallel Stack Filtering

You can use the updated Parallel Stack filtering options that let you selectively display or hide specific threads or frames. This means you can easily concentrate on the threads and frames that are important to you, giving you a clearer picture. Additionally, you can now Drag Select frames from the parallel stack window, allowing you to perform operations like copy/paste, flag/unflag, or freeze/thaw for all the selected frames at once.

A screenshot of a computer Description automatically generated

F5 Speed

We have optimized Program Database (PDB) files, resulting in improving debugging sessions and decreasing the project selection screen loading time for Unreal projects for example by 21% (~4 sec gain). Additionally, the F5 path is optimized, leading to a 5-10% improvement in the debugger’s startup time and process launch.

Image Enhanced F5 Speed

All-in-One Search Responsiveness

Several accuracy and performance enhancements are coming to All-in-One Search. For example, exact matches now show higher in the results list and results update more accurately in real time as you type your query.

A screenshot of a computer Description automatically generated

Try out the All-In-One Search experience by making sure it is enabled in Tools > Manage Preview Features > “New Visual Studio Search experience (restart required)” and using the Ctrl + T or the Ctrl + Q keyboard shortcut to launch it. If you have feedback to share with us about this feature, let us know here.

Find in Files Search Time

Find in Files search time has been significantly improved with various optimizations, resulting in a 2x speedup.

A screenshot of a computer program Description automatically generated

Game Development

C++ Build Insights

Thanks to your feedback, we are happy to announce that Build Insights is now integrated with Visual Studio 2022! Build Insights provides you with valuable information needed when optimizing your C++ build times. Start your Build Insights .etl trace capture with a click of a button for your solution or projects. In Visual Studio 17.7, you can now see Included Files and Include Tree view. For advanced profiling, click the “Open in WPA” button to see the trace in Windows Performance Analyzer.

A screenshot of a computer Description automatically generated

After compilation, Build Insights will create a diagnostic report that allows you to see expensive includes and navigate directly to header files. We are committed to continually improving Build Insights. Which additional workflows would you like to see in Build Insights? Let us know in this Developer Community Ticket. See Build Insights Now Available for more information.

C++ Unreal Engine Time to IntelliSense

In Unreal Engine projects, the time for IntelliSense and colorization to become ready in newly opened C++ files is significantly reduced. The generation of IntelliSense cache (IPCH) is now 30% faster in Unreal Engine 5.1 and 5.2 projects and 15% faster in Unreal Engine 4.27 projects.

A screenshot of a computer Description automatically generated

Unreal Engine Macros Formatting for C++

We have added an option to use special indentation rules for Unreal Engine macros. Visual Studio will detect and use indentation and formatting rules for your Unreal Engine reflection macros.

Image Unreal Engine Macros Formatting for C

To turn on Unreal Engine specific formatting, search “Unreal Engine” in Options or go to Tools > Options > Text Editor > C/C++ > Code Style > Formatting > Unreal Engine and check “Apply special formatting for Slate declarative syntax and Unreal Engine reflection macros.”

Unreal Engine Naming Convention Checker for C++

Visual Studio will now give you hints when your symbols are not conformant to the Unreal Engine coding style. After adding an .editorconfig file  to your Unreal Engine project, Visual Studio will display naming convention warnings in the Error List and provide a Quick Fix option upon right-clicking.

Image Unreal Engine Naming Convention Checker for C

To change whether Visual Studio should treat the checks as Warnings or Suggestions, go to Tools > Options > Text Editor > C/C++ > Code Style > Linter and change “Naming Convention (experimental)”.

Unreal Engine Blueprint Find All References

In this release, you will be able to search for references of UFUNCTIONs in Blueprints with the new Blueprint Find All References. The latest version of our Unreal Engine plugin “Visual Studio Integration Tool” is required.

A screenshot of a computer Description automatically generated

Improved Doxygen overload resolution

Support for Doxygen comments has been enhanced, allowing the display of shared Doxygen comments in overloads that are not directly positioned beneath the comments. Furthermore, to enhance clarity and organization, any parameters that are unused will be conveniently grouped under the heading “Unused Parameter.” See Improved Doxygen Overload Resolution to learn more about this feature.

Image Improved Doxygen overload resolution

Visualize Macro Expansion for C++

Visual Studio now enables you to observe the step-by-step expansion of macros. When hovering over a macro, a tooltip with a new “Visualize Macro” option shows up. Clicking on “Visualize Macro” opens a new window displaying the initial expansion of the macro. With the help of arrows, you can navigate through each expansion step. Clicking the window tool button will display the steps of the expansion in a different window. See Visualize Macro Expansion for C++ to learn more about this feature.

A screenshot of a computer program Description automatically generated

Linux and Embedded Development

WSL Automatic Acquisition

With the Linux and Embedded Workload, Visual Studio now makes it easier than ever to get to that one-click download of WSL. When you open a CMake project that can target Linux, a gold bar will open for users to click and open a WSL installation process. By default, it will install an Ubuntu machine. Additionally, you can open the dialog by navigation to Project > Install WSL For Me.

Image WSL Automatic Acquisition

Remote File Explorer Updates

We have added search capability to the Remote File Explorer. You are now able to search for files based on where you are in your remote machine along the top bar, and then right-click to go to any found file’s location. To open the Remote File Explorer, navigate to View > Remote File Explorer after downloading it with the Linux and Embedded Workflow in Visual Studio.

Enterprise Management and Acquisition

Ability for standard users to update and modify Visual Studio

Many enterprises spend a great deal of time and effort keeping their organization secure. They follow best practices by configuring users and machines to have a minimum level of access permissions, and they invest a lot of energy in keeping their organization’s software updated.

When organizations do restrict user permissions, it compromises their ability to keep Visual Studio updated and secure. The Visual Studio installer requires administrator permissions to use, but when users don’t have this level of access, they are prevented from updating Visual Studio and acquiring the latest security fixes and features. This problem was one of our top developer community reported issues.

We’re happy to announce that starting with the 17.7 installer, standard users with minimized permissions can now update and modify Visual Studio! The initial bootstrapping and policy configuration to enable this must still be done by an administrator, but after that, any installer functionality can be initiated and executed by a non-administrator user.

This feature will offer organizations more flexibility and make it easier for you to configure and maintain a secure and productive environment.

Rollback now preserves all user settings

We continue to make improvements to our recently shipped feature that gives you the option to “rollback an update”. If you now roll back to a version 17.7 or higher, all your local customizations such as user settings will be preserved. For more information, please visit the Rollback blogpost.

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.