February 13th, 2024

Visual Studio 2022 17.9 Now Available

Maddy Montaquila
Senior Product Manager

Welcome to Visual Studio 2022 17.9! This release comes with more capabilities and improvements that enhance productivity for you and your team, such as AI-assistance and better extensibility. Plus, we’re always improving core productivity and performance! We’ve included suggestions from you in the community and are publishing more about our backlogs in our release notes and roadmap.

From AI-powered Git commit messages and enhanced C++ game development tools to .NET/C# advancements and responsive project management capabilities, this release caters to a wide array of you and your team’s development needs.

Dive into a more efficient development experience with Visual Studio 2022 17.9 and unlock your potential to create, collaborate, and innovate more effectively.

Here are some of the major areas we’ve focused on in this release:

Area Enhancements Developer Community Link
Productivity AI-generated Git commit messages Discussion
Open a Pull Request from Visual Studio or the browser
Event Handler Leak insights
Instrumentation “Start with Collection Pause” Discussion
Switch between single and multiple rows in the document well Discussion
Non-modal Debug Visualizers
Responsive Git Ref labels Discussion
Multi-project configuration
Multi-folder open support Learn More
Auto-surround selections with quotes or brackets Discussion
C++ Game Dev Streamlined UE Blueprint references Discussion
Improved IntelliSense for Unreal Engine
Remote Linux unit testing
Specify custom CMake executable
Memory Layout for classes, structs, and unions Discussion
#include reference diagnostics
.NET/C# Automatic Deoptimization
Blazor CRUD scaffolding
Razor snippets
Multi-tfm support for Razor files
Live Property Explorer support for .NET MAUI Discussion
Ecosystem Ability to load extensions using .vsconfig files Discussion
Discover subscriber benefits Learn More

Productivity

AI Generated Git commit messages

One of the things I always struggle with is coming up with descriptive Git commit messages for whatever changes I’ve made in my local repo. The new generated commit message feature is designed to assist you in succinctly describing your changes, ensuring clarity and relevance in your commits.

To get started, ensure you have an active GitHub Copilot subscription along with the GitHub Copilot Chat Extension installed. Simply click the ‘Add AI Generated Commit Message’ sparkle pen icon within the Git Changes window for a suggested commit message. GitHub Copilot analyzes your commit’s file changes, provides a summary, and then offers a descriptive message for each change. Choose to ‘Insert AI Suggestion’ or ‘Discard’ based on your preference. We welcome your feedback on this feature at this link.

Open a Pull Request in Visual Studio or the browser

To support GitHub and Azure DevOps users who prefer to use the browser view for creating pull requests, we’ve added a secondary link to help maintain your workflow.

Image open pr in browser

Event Handler Leaks insights

Finding memory leaks is one of the more challenging parts of developing your app. Now, the Managed Memory Insights tab can detect “Event Handler Leaks,” which can happen when one object subscribes to another object’s events. If the event publisher lives longer than the event subscriber, the subscriber remains in memory, even when there are no other references to it. This can cause memory leaks and the application will use more memory over time without releasing unused memory properly.Image event handler leaks

Instrumentation tool “Start with collection pause” option

The Instrumentation tool now has a “start-pause” option for profiling applications. This lets you start the app under the profiler’s control without immediately collecting data. You can resume data collection later when needed by hitting the record button. This is useful, especially in gaming, where you can get into the game before data collection starts. The feature is compatible with both native and managed projects.Image start with collection pause

Switch between single and multiple rows in the document well

You can now quickly switch between single and multiple tab rows in Visual Studio’s document well by scrolling the mouse wheel up or down. The first time you open more tabs in Visual Studio than can fit in a single row in the document well, you’ll see a tip letting you know of this new feature.

Image single vs multiple tab rows

Scrolling down on the mouse wheel while hovering over the tabs in the document well will shift your view to show multiple tab rows. Conversely, scrolling up on the mouse wheel will collapse the view down to a single tab row.

Non-modal Debug Visualizers

Debug Visualizers are now non-modal, allowing concurrent interaction with the Editor while the visualizer window is active. It is possible to have multiple types of visualizers open simultaneously, and you have the flexibility to choose whether to float or dock your visualizer window.

Image non modal visualizers

Responsive Local History labels in the Git Repository window

Your branch and tag labels now resize responsively to make it easier to see which branches you’re looking at in the Git graph.

Image git ref labels

Multi-project configuration

Now, you can easily set up and save profiles for launching specific projects within a multi-project solution for streamlined debugging. Simplify working with complex solutions, enhance debugging efficiency, and effortlessly share configurations with your team.

 

Multi-folder open support

Image multi folder open

Auto Surround with Quotes or Brackets

You can now easily surround a selection with bracket delimiters including: “double quotes”, ‘single quotes’, and (parentheses).

New surround with brackets functionality

To enable or disable this feature, go to Tools > Options > Text Editor and check the “Automatically surround selections when typing quotes or brackets” option.

C++ and Game Dev

Streamlined Unreal Engine Blueprints references

Available gradually over the upcoming weeks, you will no longer need the Visual Studio Unreal Engine plugin to see Blueprint References, and Visual Studio will now display CodeLens hints with reduced latency and use fewer machine resources. Additionally, we have added support for including usages of UFUNCTIONs outside of the class hierarchy directly in the CodeLens results. We will cache your results from previous scans and only process new or modified assets since the last scan.

Improved IntelliSense for Unreal Engine projects

Unreal Engine uses its own reflection mechanism to connect the worlds of C++ and Blueprints. This is achieved through custom preprocessing of C++ sources with the Unreal Header Tool (UHT) and injection through the regular C++ preprocessor. We have improved the handling of Unreal Engine IntelliSense by ensuring consistency and accuracy. IntelliSense will now refresh more readily for UHT generated files, reducing the likelihood of displaying unwarranted errors. 

Remote Linux unit testing

Based on your feedback we have enabled running unit tests for remote Linux scenarios. Try it out with your C++ projects that target Linux on WSL or remote systems in the Test Explorer. Learn more about how the Azure Networking Team has used remote Linux in Visual Studio, including remote unit testing. 

Image remote linux testing

Specify custom CMake executable

Visual Studio ships with CMake bundled when you download the Desktop Development with C++ workload. However, you can now specify your own custom CMake executable on your machine if desired.  Navigate to Tools > Options and select CMake > General. From here, you can check Enable custom CMake executable and specify the directory path of your CMake executable you wish to use.

Image custom cmake exec

C++ Memory Layout Visualization

Based on your feedback we have added the Memory Layout feature. This feature enables visualization of the memory arrangements for your classes, structs, and unions directly within your editor, removing the need for compilation to view these layouts. When you hover over your types, a “Memory Layout” link will appear within the Quick Info. Clicking this link will open a dedicated window displaying the memory layout of the selected type. Furthermore, hovering over individual data types within this window will provide detailed information about their size and offset within the type.

A GIF displaying an example of Memory Layout

#include Diagnostics

Visual Studio now introduces #include Diagnostics, which provides a detailed analysis of your #include directives by displaying their references and build time. Once you turn on this feature, the number of references will be displayed in CodeLens. From there, you can easily navigate to the list of references and locate each reference. To view the build time of your #include directives next to their references, you will need to run Build Insights by navigating to Build > Run Build Insights.

Image include diagnostics

.NET/C#

Automatic Deoptimization

With .NET 8, the Debugger now automatically optimizes release code and external code while debugging. When you set breakpoints and go through your code step by step, only the parts you stop at will be optimized, keeping the rest of your application running smoothly. To use this feature, you just need to turn off the “Just My Code” option in the debugger settings. This improvement brings benefits like fewer errors in the locals, watch, and immediate windows, and less unexpected code jumps when you’re debugging your application.

 

Razor Snippets

HTML snippets are now available in Razor (.razor) files, making it easier and faster to write out common, repeating code patterns.  To insert a snippet, start typing a common HTML tag (i.e. <table>) and select one of the dashed-box options from the resulting dropdown.

Multi-TFM Support for Razor Files

Multi-targeting framework support (TFM) is now available for Razor files. This allows you to include code that targets a particular framework and filter between code that targets each framework using the dropdown header above the editor window.  You can also use the navigation bar drop downs to quickly navigate to different classes and members in the Razor file.

Blazor file with multi tfm intellisense support

Blazor Scaffolding for .NET 8 Projects

We have added support to scaffold views for Blazor projects, including CRUD (Create-Read-Update-Delete) using Entity Framework. After adding a model class to a Blazor project, you can get started with scaffolding by right clicking on the project in the Solution Explorer and selecting Add New Scaffolded Item. In the dialog that appears the new scaffolders are in the node under Common > Razor Component.

New blazor scaffolding wizard

If you select the option Razor Components using Entity Framework (CRUD), you will get another dialog prompting for the details of what should be scaffolded.

CRUD specific scaffolding UI

Here you select your model class and the DbContext that should be used. You can also create a new DbContext if needed. After completing this process files will be added to your project to enable the CRUD operations on the model class selected.

The UI which is generated from the model provided looks like this:

Screenshot of the newly scaffolded UI

Some important notes on the code which is generated in your project.

  • The scaffolded code uses the new static server-side rendering support in Blazor in .NET 8
  • The generated components only work on the server – they aren’t supported with WebAssembly based rendering
  • The generated code uses the new QuickGrid component in .NET 8 for the table, which supports, sorting, filtering, pagination, etc if you enable interactivity on the page

Live Property Explorer Support for.NET MAUI

Live Property Explorer, a powerful tool that enables more efficient development, is now supported with .NET MAUI. It enables you to inspect XAML properties while debugging, to be used in conjunction with XAML Live Preview and Live Visual Tree.

Image lpe With LPE, you can easily view and tweak the properties of your app controls at runtime, which is especially useful when you’re looking to debug issues, optimize performance, or investigate where a property is defined in.

To access the Live Property Explorer: Start and debug your app. Then, navigate to Debug > Windows > Live Property Explorer. Once you’ve opened the Live Property Explorer, you can use it to explore and live edit properties in your .NET MAUI app. For more information, visit our docs.

Navigating to turn on the live property explorer

Ecosystem

Extensibility

Many of our developers, including myself, enhance their Visual Studio environment by using custom extensions that provide targeted, specific, and often contextual functionality. However, it’s not always easy to standardize extension use across teams, projects, installations, etc.  We’re happy to announce that starting in Visual Studio 2022 version 17.9, you can use your vsconfig files to include extension information alongside the component listing.  Since *.vsconfig files are easy to pass around and share with others, it’s now easier to share information about which extensions need to be installed. This capability to load extensions thru a vsconfig file was one of our top requested community features, and we’re very excited to finally start delivering on this vision.

When the Visual Studio installer reads a vsconfig file, it will detect if any extensions are specified, and if so, it will load them within Visual Studio in a machine wide context, available for all users to use.  Recall that *.vsconfig files work in a variety of common scenarios.  For example, you can add a vsconfig file to your repo or solution, and when Visual Studio loads the solution it’ll process the config file and prompt you to load any missing components or now extensions. You can use the installer and import a config file into an existing installation, or use it to initialize a new installation. You can programmatically modify an existing installation and pass in a vsconfig file to the installer or use it with winget configure.  Lastly, you can create a layout using a vsconfig file and now you can instruct clients that install from that layout to respect the config file.

In 17.9, we’re delivering the first iteration of this experience, but there are more features still under development. For example, we’re working on the ability to detect missing non-marketplace extensions in the config file during solution load, the ability to export extensions, and the ability to load “complex” extensions.  We’ll soon start to work on streamlining the other common installer operations such as update.

Please try this feature out and let us know what you think! Your feedback is valuable and helps us prioritize which important and useful functionality to deliver next.

Discover Visual Studio Subscriptions

Many Visual Studio Enterprise or Professional subscribers might not be aware that their subscription includes additional benefits beyond the IDE. To help you discover and activate your benefits, we have added a new diamond icon to the Visual Studio toolbar.

Upon clicking the diamond, a window opens to highlight our most popular benefits. In addition, the diamond experience provides links to take you to your my.visualstudio.com portal where you can find additional offerings such as training resources, magazine subscriptions, in-depth support, and product downloads.  For more details about the benefits included in your Visual Studio Subscription, please login to My.VisualStudio.com.


Share your feedback and stay connected with Visual Studio!

We appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

On behalf of the entire Visual Studio team, thank you for reading. Happy Coding!

Topics
Release

Author

Maddy Montaquila
Senior Product Manager

Maddy is a Product Manager focused on making .NET developers as productive as possible, from mobile apps to microservices ✨

63 comments

Discussion is closed. Login to edit/delete existing comments.

  • Frank Hileman

    I believe the word “optimize” was accidently substituted for “deoptimize” in several places. After all, it is the de-optimization that makes debugging easier.

  • Pavel Chmelař · Edited

    Be careful with this update 17.9. In our multitarget framework project it randomly mixes dlls in the output folder. For example it copies dll of net8.0 to net8.0-windows and when you use some windows specific things and for other frameworks aren’t implemented it throwing unexpected exception. Problem is already reported: https://developercommunity.visualstudio.com/t/Random-multitarget-dll-compilation-mishm/10593261
    This has to be fixed asap. Same problem in 17.10 Preview 1.

  • Surber, Jessica

    The update to creating pull requests in the browser vs in Visual Studio doesn't have a discussion, so I have to post this here. As someone who prefers to make PRs in the browser, now the process is much more convoluted. Prior to this update, I could simply right click on my branch and select "create pull request". Now I have to switch to that branch, do a Push for no reason at all, and...

    Read more
  • Tim Wörner

    The Multiple startup Project is not in the Solution Build toolbar which still makes it hard to change from Single Startup Project to Multiple Startup Project
    because to activate the Multiple startup project I have to right click on the solution -> Configure Startup projects -> Change the Radio Element from Single to Multiple -> Save and then I have the multiple again

    Better: Add the the Multiple Startup Project Configuration also in the Toolbar where...

    Read more
  • Mohsen Heydari

    Hi, is this version ( 17.9 ) dotnet 8.1 offered or is it still not running with dotnet 8.0?
    Thank you.

  • Michael Link

    For me the Sticky Scroll margin is displayed in different, bright colors than the rest of the text editor. It looks very jarring with One Dark Pro theme.

  • Simon Collis

    The expand/collapse margin has changed from plus/minus signs to weird, Lotus Notes-y twisty arrows. Is this deliberate or a bug? More importantly, how do I change it back?

    • Nikos Mileounis

      I rolled back to the previous version (17.8.6) with the plus/minus signs since I didn’t find any way to change the icons.

  • Prasad Nisha

    Unable to install Visual Studio Enterprise Edition 2022 17.9 on Windows 10 21H2. I am getting the following error. Any idea how to resolve this?

    [66cc:001c][2024-02-15T11:26:47] Error 0x80096004: SHA256 verification for 'windowsdesktop-runtime-x64.zip' failed. Expected hash: 6D6AB22EED8D6C2E9A70839E491E8AD2B353FEB02592BC1A293BD24A2F478AE5, Actual hash: DDF5309F08403662F05D03057A9918FA19746D5323F075E4B8F80BE935A87012

    [66cc:00f3][2024-02-15T11:36:24] Package 'Microsoft.Net.8.0.WindowsDesktop.Runtime,version=17.9.34606.255,productarch=x64' failed to download from 'https://download.visualstudio.microsoft.com/download/pr/ceafeb53-5ffc-4e08-9518-8dfa7076488d/6d6ab22eed8d6c2e9a70839e491e8ad2b353feb02592bc1a293bd24a2f478ae5/windowsdesktop-runtime-x64.zip'. WebClient download failed: Error: Content-Length is missing from response header.. Bits download failed: SHA256 verification for 'windowsdesktop-runtime-x64.zip' failed. Expected hash: 6D6AB22EED8D6C2E9A70839E491E8AD2B353FEB02592BC1A293BD24A2F478AE5, Actual hash: 9F1E6991E38E3E324697B3922826BD0005E88489A98A8056E9982A4E51E59845. WinInet download failed: SHA256...

    Read more
  • Рома Шибалов

    I’ve been waiting for the automatic closing of quotes and brackets for a long time!