Visual Studio logo Visual Studio 2022 Preview release notes

Version 17.11 Preview 2

Released June 11th, 2024

This release focuses on quality-of-life enhancements for all developers and workloads. When you use Visual Studio, you want to feel empowered and productive. That's why quality-of-life features are so important: they make coding a smooth and enjoyable experience, free of unnecessary hassles and headaches. We hope you'll love this update.

Productivity From the community
Find the code you're looking for Preview 1 Feedback ticket
More meaningful code reviews Preview 1 Feedback ticket
Pull requests using drafts and templates Preview 1 Feedback ticket
Familiar keyboard shortcuts Preview 1 Feedback ticket
GitHub Copilot From the community
GitHub Copilot is getting smarter Preview 2
Naming things made easy Preview 2
AI-generated breakpoint expressions Preview 2
Debugging & diagnostics From the community
Easier to fix async exceptions Preview 1 Feedback ticket
Profile faster and more consistently Preview 1
Profile external code with ease Preview 1 Feedback ticket
Improved debugging on Arm64 Preview 2
Blazor WebAssembly debugging Preview 2
Faster C++ breakpoints Preview 2
Auto-add breakpoints to the default group Preview 2
Expressive IEnumerable Visualizer Preview 2
IDE From the community
Never miss installing a component Preview 1 Feedback ticket
Stay updated and secure Preview 2 Feedback ticket
Improved user authentication Preview 1
Web From the community
Discover dynamic Web API routes Preview 2 Feedback ticket
NPM packages in Solution Explorer Preview 1
Gaming From the community
Build Insights QoL Update Preview 2
Unreal Engine Add Class Templates Preview 1 Feedback ticket
Unreal Engine Add Module Preview 2 Feedback ticket
Unreal Engine Toolbar Preview 1
.NET From the community
Revamped Resource Explorer Preview 2 Feedback ticket
C++ From the community
Debug your CMake projects on Linux Preview 1 Feedback ticket
Top bug fixes From the community
Rich copy/paste of C# source code into Office fails Preview 1 Feedback ticket
Incorrect error with in-class pointer to member variable Preview 1 Feedback ticket
Optimization of right bit shift switches type from signed to unsigned Preview 1 Feedback ticket
Index outside bounds when switching branch Preview 1 Feedback ticket
False Positives for Warning C26434 (Code Analysis) Preview 1 Feedback ticket
Partial visualizations of std::variant in the debugger Preview 1 Feedback ticket
MSVC v19.37+ incorrect code gen for arithmetic expressions Preview 2 Feedback ticket
C4506 (no definition for inline function) incorrectly reported for template spec... Preview 2 Feedback ticket
Missing integral types overload for cmath functions Preview 2 Feedback ticket
Fixes hang when stopping debugging an ASP.NET Core application Preview 2.1
Fixes an issue where a singleton assembly shipped by VS can cause applications which load icons to crash when loading icons related to VS such as .sln files Preview 2.1

Note

See the full list of all the user-reported feature requests and bug fixes that made it into this release.

Productivity

Find the code you're looking for Preview 1

Narrow down a code search from the entire solution to the current document or current project.

Do you ever feel like you're seeing too many results in code search? Narrow down your focus with the newly added scoping options in Code Search.

For the default code search experience and each filter, you can now set the scope to Entire solution, Current project, or Current document and toggle inclusion of external files.

You can set different scopes for different filters. For example, the default experience can be set to look through Entire solution and members can be set to look through only current document. Your selections will be preserved past the current session.

All-In-One Search Scoping

Note

This feature must be enabled under Tools -> Manage Preview Features

📣 See feature ticket to share your feedback and continue the conversation.

More meaningful code reviews Preview 1

View your Azure DevOps and GitHub pull request comments directly in your working file.

We've made it easier to view your GitHub and Azure DevOps pull request comments directly in your working file in Visual Studio. You can now stay in your context, make necessary code changes, and interact with your colleagues' suggestions without switching contexts to the browser.

New Improvements

Enable the feature flag, Pull Request Comments, checkout any branch with an active pull request branch, and click on Show comments in files in the InfoBar.

View pull request comments notification

The latest improvements include better support for @ mentions and work item references, visual improvements to the attention dot and comment margin, the addition of avatars, better sync with the server, and an additional entry point in the Git changes window.

Note

This feature must be enabled under Tools -> Manage Preview Features

📣 See feature ticket to share your feedback and continue the conversation. And take this survey to help make the feature even better.

Pull requests using drafts and templates Preview 1

Create pull request drafts and start your descriptions with templates in Visual Studio.

You can now create pull request drafts and start your descriptions with GitHub templates in Visual Studio. These were the two top requests for the create a pull request experience.

Draft PRs

Use the drop-down menu on the Create button to Create as Draft.

Create pull requests draft option

PR Templates

Your default PR template will be used when creating a new PR for both GitHub and Azure DevOps. Learn more about how to add a PR template to your repository in the GitHub documentation and Azure DevOps documentation.

Note

This feature must be enabled under Tools -> Manage Preview Features

📣 See feature ticket to share your feedback and continue the conversation. And take this survey to help make the feature even better.

Familiar keyboard shortcuts Preview 1

Some common keyboard shortcuts now match those in other popular IDEs.

When moving between different IDEs and editors, it can be frustrating to have to relearn keyboard shortcuts. We've made some changes to some default keyboard shortcuts to make them more familiar and to preserve your muscle memory.

Toggle line comments

You've been able to toggle line comments in Visual Studio for a long time, but the default keyboard shortcut was Ctrl+K, Ctrl+/. We've now added Ctrl+/ as an alternative shortcut, which is the default in many other IDEs and editors.

Toggle line comments

Open Command Palette

Or Feature Search as it's called in Visual Studio. The default keyboard shortcut for this feature is now Ctrl+Shift+P, which should be familiar to VS Code users for opening the Command Palette.

Feature Search

📣 See feature ticket to share your feedback and continue the conversation.

GitHub Copilot

GitHub Copilot is getting smarter Preview 2

GitHub Copilot now includes context from your entire repository & can search the web

GitHub Copilot Enterprise subscribers in Visual Studio can now use GitHub Copilot Chat to get answers enriched with context from their entire repository and Bing search results.

Get answers from across your entire codebase

GitHub Copilot Chat can now answer questions with understanding of your full repository, not just the tabs you have open. Index your repository on GitHub.com, and then ask a question mentioning @github. You can ask questions like @github where is rate limiting implemented?

Search with the context of the web

GitHub Copilot chat can also search Bing to find information outside of its general knowledge or your codebase. When you mention @github, Github Copilot will intelligently decide when to use Bing. You can ask questions like @github what is the latest LTS version of Node.js?

Bing search is only available if enabled by an administrator - for more details, see Enabling GitHub Copilot Enterprise features or read the docs.

Naming things made easy Preview 2

You can use GitHub Copilot to generate naming suggestions for your identifiers in C++.

GitHub Copilot can now generate naming suggestions for your identifiers (variables, methods, or classes) based on how your identifier is being used and the style of your code.

Rename suggestions

To try it out, you'll need an active GitHub Copilot subscription. Navigate to any variable you wish to rename, right-click -> Rename (Keyboard: Ctrl+R, Ctrl+R). You'll notice a GitHub Copilot sparkle icon that you can click or toggle to generate naming suggestions.

This feature is available for C#, C++, and more languages.

AI-generated breakpoint expressions Preview 2

Use AI-generated expressions to insert conditional breakpoints or tracepoints in C++.

AI-generated expressions for conditional breakpoints and tracepoints are now supported in C++. GitHub Copilot analyzes your code and offers insightful breakpoint expressions, streamlining your debugging process.

AI Breakpoint Suggestions CPP

When you position the cursor within the condition text for a conditional breakpoint/tracepoint in the breakpoint settings window, GitHub Copilot will promptly offer AI-generated expression suggestions based on your codebase. You have the flexibility to select the condition that best fits your requirements for placing the conditional breakpoint/tracepoint.

Debugging & diagnostics

Easier to fix async exceptions Preview 1

The debugger now breaks on async method exceptions caught by framework code.

Debugging asynchronous code, especially in frameworks like ASP.NET, can be tricky due to the potential for exceptions to be thrown across asynchronous boundaries.

Now, with Visual Studio Debugger it automatically breaks when an async Task method throws an exception back to framework code.

Break on Async Exceptions

This will allow you to easily identify and diagnose issues in your ASP.NET applications, leading to faster debugging cycles and improved productivity.

Please note that this is for .NET 9 and newer projects only.

📣 See feature ticket to share your feedback and continue the conversation.

Profile faster and more consistently Preview 1

The instrumentation tool in the profiler now remembers your target selection between runs.

The instrumentation tool now persists the target selection between runs offering a significant benefit by enhancing the continuity of profiling sessions.

With this improvement, you can maintain your specified target across multiple instrumentation runs, eliminating the need for repetitive selection tasks.

Instrumentation Target Persists

Profile external code with ease Preview 1

The profiler supports auto-decompilation for .NET libraries, enabling effortless profiling of external code.

Visual Studio profiler now offers auto-decompilation for .NET libraries in scenarios where source code is unavailable. By automatically decompiling code during source lookup, even without loaded symbols or exact file locations, you can gain insights into the code's structure and performance issues.

Profiler Source Decompilation

This feature is particularly advantageous when dealing with non-user external code, empowering you to analyze and optimize your application's performance effectively, thus enhancing your development workflow.

📣 See feature ticket to share your feedback and continue the conversation.

Improved debugging on Arm64 Preview 2

The Visual Studio debugger supports AnyCPU applications manifested to run as arm64.

Visual Studio natively supports building and debugging Arm64 apps on Arm-based processors. Unfortunately, applications built with the AnyCPU setting running on an Arm64 machine, will default to using x64 emulation. While the capabilities of the x64 emulator have expanded, the most efficient Arm CPU scenarios are supported when applications are running natively.

To better support the intended native behavior the Windows 24H2 update introduces a new <supportedArchitectures> setting for your App manifest files. .NET developers can include a list of supported architectures (amd64 or arm64), explicitly signaling that an application built with the AnyCPU setting should run natively using the Arm64 CLR on Arm64 devices.

With this release Visual Studio can read these new manifest entries when the application launches, allowing debugging to be initiated based on the correct architecture.

Blazor WebAssembly debugging Preview 2

A preview of the improved debugging experience for Blazor WebAssembly apps targeting .NET 9 or later.

Visual Studio now offers a preview of an improved debugging experience for Blazor WebAssembly apps targeting .NET 9 or later:

  • Data types shown in the debugger now match the expected .NET data types.
  • Type members and member visibility use expected icons.
  • The displayed call stack is cleaned up to only shows the .NET call stack and correctly honors the Just My Code setting.
  • The modules window is now supported.
  • Expression evaluation support in the Immediate window and for watches and conditional breakpoints is expanded and improved.

Blazor debugging improvements

To enable the new preview debugging experience:

  • Enable the Enable new .NET 8+ Mono debugger (preview) setting.
  • Install the latest .NET 9 SDK.
  • Update your Blazor app to target .NET 9.

Known limitations:

  • Hot reload while debugging is not yet fully functional. This will be addressed in a future update.

Faster C++ breakpoints Preview 2

Optimize your debugging with enhanced conditional breakpoints performance in C++

We have significantly enhanced the performance of conditional breakpoints in C++ through a reworked implementation.

Beginning with version 17.10, our initial assessment reveals at least a 70% performance improvement, reducing execution time from 80 seconds to 21 seconds over 80,000 iterations.

C++ conditional breakpoint performance

As shown in the video, the left side shows the conditional breakpoints performance in version 17.9, while the right side shows the performance in version 17.10 onwards.

Auto-add breakpoints to the default group Preview 2

Organize breakpoints for swift troubleshooting with default breakpoint groups in Visual Studio.

You can now mark the selected breakpoint group as the default, ensuring all newly added breakpoints are automatically included in that group.

Default Breakpoint Group

This enhancement simplifies the management and organization of breakpoints, providing seamless debugging when investigating multiple issues.

Expressive IEnumerable Visualizer Preview 2

The editable expression feature in the IEnumerable visualizer allows direct editing and visualization of LINQ expression in the Visual Studio debugger.

The Visual Studio debugger now offers an editable expression feature in the IEnumerable visualizer, a powerful enhancement for developers working with collections.

Overview

With this new feature, while visualizing a collection or dataset, you can directly modify the expressions textbox on the top of the dialog with your desired LINQ expressions. The visualizer updates in real-time, reflecting the data change resulting from your query.

Editable Expression Textbox

Potential Applications

The editable expression feature facilitates debugging of dense datasets and complex collection manipulations. You can easily apply different filters or sort orders to your collections based on your needs. By experimenting with data transformations and filters directly within the Visual Studio debugger, you can streamline your development workflow and achieve more efficient debugging. Here is an example to try out on your own:

Editable Expression Textbox Example

IDE

Never miss installing a component Preview 1

By using *.vsconfig files, you can ensure that your team has all the necessary components and extensions installed that your solution requires.

Many teams use *.vsconfig files to standardize their teams' Visual Studio installations. The *.vsconfig files can be placed in a repo or a project's solution directory, and Visual Studio will automatically detect if components specified in the *.vsconfig file are missing.

Private extension in .vsconfig

If any are missing, then a notification such as the one pictured below will appear.

InfoBar in Solution Explorer prompting to install missing components and extensions

We've made two improvements to this experience in Visual Studio 2022 version 17.11 Preview 1.

  1. First, Visual Studio can now detect if any local or network hosted extensions are missing from the installation, and if so, it'll prompt you to install them. Previously, with respect to extensions, Visual Studio was only able to recognize if marketplace extensions were missing.
  2. Secondly, Visual Studio will now re-prompt the notification in certain situations, such as if the *.vsconfig file has changed because new components or extensions get added to it. Previously, the notification would only pop until you acted upon it, at which point it would be suppressed forever.

📣 See feature ticket to share your feedback and continue the conversation.

Stay updated and secure Preview 2

Keep Visual Studio updated and secure by enrolling in Microsoft Updates.

Keeping your software updated on a regular cadence is a security best practice that we highly recommend.

Visual Studio security updates will be available to all individual users through the Microsoft Update channel, which is part of the Windows Update system. Users that enroll in this will automatically receive and install Visual Studio monthly security updates silently and in the background when the machine is idle, which makes it super easy to stay updated and secure.

You can preview this experience with Visual Studio 2022 starting in June 2024 by turning on the Receive updates for other Microsoft Products option in the Windows Update UI and enabling the PreviewAutomaticUpdates registry key. Once you opt into this experience, then if you have Visual Studio 2022 version 17.9 or earlier installed, the Windows update system will deliver and automatically install the latest Visual Studio monthly security release. Further details can be found here.

Windows Update Advanced options

This functionality is an extension of our Administrator updates solution, which was designed to help organizations stay secure. Many enterprises, including Microsoft, have been using this solution to automatically deploy hundreds of thousands of security updates each month.

📣 See feature ticket to share your feedback and continue the conversation.

Improved user authentication Preview 1

Visual Studio now uses the Windows authentication broker otherwise known as WAM as the default authentication mechanism.

Visual Studio now uses the Web Account Manager (WAM) as its main authentication mechanism. This integration not only streamlines the authentication experience for Visual Studio, but it also enhances the security of your credentials.

Here's how the new WAM experience looks like:

WAM select account dialog showing available Windows accounts

How does this impact your experience?

Using WAM as the default authentication experience has many benefits, including:

  • Windows integration: In addition to reducing the overall number of authentication prompts, you can now select existing Windows accounts instead of repeatedly entering credentials.
  • Better token protection: Refresh tokens are better secured as they are now device bound.
  • Support for the latest security features:
    • Leverage rich OS capabilities such as Windows Hello & FIDO keys.
    • Access the latest and greatest Microsoft Entra ID capabilities and conditional access policies.

Web

Discover dynamic Web API routes Preview 2

The Endpoints Explorer has been updated to discover endpoints at runtime.

When working with ASP.NET Core Web APIs you can use the Endpoints Explorer to view and interact with the endpoints.

The Endpoints Explorer discovers endpoints statically to show the initial set of endpoints. There are some endpoints which cannot be statically discovered. For example, any endpoint defined in a class library project is one example. There are other ways to register endpoints which cannot be discovered statically.

When you run or debug your Web API, Visual Studio will also discover routes at runtime and add those to the Endpoints Explorer.

Endpoints Explorer

📣 See feature ticket to share your feedback and continue the conversation.

NPM packages in Solution Explorer Preview 1

See your NPM packages show up under the Dependencies node in Solution Explorer.

We unified the NPM experiences you get in ASP.NET and JavaScript and TypeScript projects. You will therefore now also see your NPM packages listed in Solution Explorer for JavaScript and TypeScript projects.

NPM packages in Solution Explorer

This is the same experience you get for NuGet, but now for NPM as well.

Gaming

Build Insights QoL Update Preview 2

Adds various quality of life improvements to C++ Build Insights.

In this update, we added quality of life changes to C++ Build Insights integration. You can now filter your Build Insight trace results by project. For results in each row, you will now see the relative path and file name instead of the full path. We have also improved the grouping of results in the Included Files view.

Build Insights QoL Update

Unreal Engine Add Class Templates Preview 1

Add common Unreal Engine class templates to your project with the new Add Class.

When directly editing an Unreal Engine project, you can now add additional common Unreal Engine class templates to your project with the new Add Class dialog. This dialog provides a list of common Unreal Engine class templates that you can add to your project. You can also now add your class to a module of your choosing.

To get started, right click on the project in Solution Explorer and select Add > Unreal Engine Class. In the Add New Item dialog, select Unreal Engine Class to open the Add Class dialog.

Unreal Engine Add Class

📣 See feature ticket to share your feedback and continue the conversation.

Unreal Engine Add Module Preview 2

Add Unreal Engine modules to your project with the new Add Module.

You can now add Unreal Engine modules to your project with the new Add Module dialog.

To get started, right click on the project in Solution Explorer and select Add > Unreal Engine Module. In the Add New Item dialog, select Empty Unreal Engine Module to open the Add Module dialog.

Unreal Engine Add Class

📣 See feature ticket to share your feedback and continue the conversation.

Unreal Engine Toolbar Preview 1

Quickly access Unreal Engine related actions via a dedicated toolbar.

The new Unreal Engine toolbar provides quick access to Unreal Engine related actions. The toolbar is available when you have an Unreal Engine project loaded in Visual Studio. The toolbar includes the following actions:

  1. Quicky attach to Unreal Engine processes
  2. Rescan Blueprints Cache
  3. Quick Access to Unreal Engine Log
  4. Quick Access Unreal Engine Configuration Page for Visual Studio

Unreal Engine Toolbar

.NET

Revamped Resource Explorer Preview 2

The brand new Resource Explorer makes it easier than ever to manage your .resx files in .NET.

In this version of Visual Studio, we're introducing a revamped Resource Explorer UI to better accommodate the needs of the modern .NET developer.

In this update we made the following improvements:

  1. Muti-resource view: You can now load multiple files and view all localizations at once within the same view.
  2. Search and filter: We have added search to make finding resources in large solutions a breeze.
  3. Comments: Each translation of a resource now has its own comment, all visible at once in the data grid. Look for the small triangle icon in the corner of each cell with a comment.
  4. Warnings: Placeholder validation and missing translation warnings.
  5. Accessibility and UI: We have improved the compatibility with screen readers and assistive technology, added zoom functionality to the data grid, and now allow VS Theming for the editor (including dark mode).

Improved Datagrid

📣 See feature ticket to share your feedback and continue the conversation. And take this survey to help make the feature even better.

C++

Debug your CMake projects on Linux Preview 1

Debug your CMake scripts for projects targeting Linux using WSL and SSH.

We have added support for the CMake debugger in CMake projects targeting Linux via WSL or SSH. The CMake debugger allows you to debug your CMake scripts and CMakeLists.txt files through the Visual Studio debugger.

To start a CMake debugging session, set a breakpoint in your CMakeLists.txt file and then navigate to Project > Configure Cache with CMake Debugging.

CMake debugger Linux

📣 See feature ticket to share your feedback and continue the conversation.



Tip

If there are any features you'd like to see in future updates to Visual Studio, please let us know by submitting a feature ticket.

Note

Our roadmap shows the priorities and direction for the future of Visual Studio, so make sure to check it out.

From all of us on the team, thank you for choosing Visual Studio. If you have any questions, please reach us on Twitter or Developer Community.

Happy coding!
The Visual Studio team