Visual Studio 2022 17.2 is now available!

Tim Heuer

Today we are pleased to release Visual Studio 2022 17.2 as generally available. We want to acknowledge and thank all developers like you that continue to provide us valuable feedback on your experiences using Visual Studio 2022 for helping shape the product and be a part of our release!

This release brings continued improvements to the C# and .NET experiences, new Git performance and experiences, updates for C++ developers, and new Azure tools for local development and deployment. We also continue to address your direct feedback submitted via Developer Community, addressing over 400 feedback items in this release! You can see the broader list of community feedback addressed in releases by visiting the fixes page on Developer Community.

I want to highlight a few of the new capabilities that are now available in Visual Studio 2022 17.2 released today. We have also released 17.3 Preview 1 – some additional details about that at the end of this post.

We now surface embedded source and Source Link as part of ‘Go to Implementation’ if a referenced assembly has provided this information. This allows you to navigate to the original source files that implements the target symbol. As seen below in this animation it’s as simple as placing your cursor on a symbol and press CTRL + F12 to navigate to the original source file.

Animation demonstrating using Go To Definition with embedded source and Source Link information

 

 

Raw string literal

In C# 11 we added a new language feature called raw string literals. We now have a refactoring to convert a normal or verbatim string literal to a raw string literal. To use raw string literals, set the language version in your project file to preview (using <LangVersion>preview</LangVersion>). Place your cursor on a normal or verbatim string, then press CTRL + ‘.’ to trigger the Quick Actions and Refactorings menu and select ‘Convert to raw string.’

Screenshot of raw string literal code fix

Debugging collections

We recently highlighted this capability in a Visual Studio 17.2 Preview 2, but it bears repeating again. If you regularly debug your .NET code and want to inspect into large and maybe complex collections, we’ve introduced a new visualizer in the debugging experience for IEnumerable object types:

Animation showing the IEnumerable debug visualizer in action

 

This provides a much easier view into this type of data to rapidly see the information you seek and be able to navigate quickly. For more details into this capability, be sure to check out other examples in our preview blog post from April.

Razor editor

Since 17.1 we’ve been improving the reliability of the new Razor editing experience.  In 17.2 we’ve added support in the editor for:

  • Ability to collapse regions for easy readability and organization
  • The new Razor editor now supports snippet functionality in C# code!
  • We’ve heard you and the ‘wrap div’ shortcut is enabled, use Shift + Alt + W to execute

Web Live Preview for ASP.NET Framework

In the initial release of Visual Studio 2022 we introduced a new capability for those working with Web Forms applications and the designer.  Web Live Preview enables your running app to be the design surface and provides code synchronization across source and web surface to help you navigate directly to the code file for the element you are editing.

Animation showing Web Live Preview in action with code sync

After continued studies of developers with Web Forms apps, we have improved the experiences even more in this release. We have also worked with several ASP.NET control vendors to ensure their support in this new designer. If you are working in Web Forms, please switch to this feature using Tools > Options > Web Forms Designer options menu and continue to give us feedback!

Azure Development

Azure continues to expand, and Visual Studio is right there for you to enable you to quickly be able to configure, debug, and deploy your services.

In Visual Studio 2022, we’ve expanded our capabilities in Connected Services to allow you to use containers for some Azure services that you might have configured, providing you with a local debug experience. This support has expanded to allow you to configure areas like Redis Cache, MongoDB, RabbitMQ, Storage, SQL, and Cosmos DB all using container images. Configure the dependency and F5 and we’ll launch the containers for you!

Screenshot of Azure services container configuration

In addition, we have support for the newest Azure container service, Azure Container Apps, within Visual Studio to deploy directly or configure with GitHub Actions. If you are deploying your ASP.NET Core web app or API using containers you can now choose Azure Container Apps as a deployment target in the Publish capabilities:

Screenshot of Publish configuration to Azure Container Apps

And we will help you either provision or select the right container environment, registry and other deployment options, including generating a GitHub Actions Workflow for deploying using CI/CD:

Screenshot of GitHub Workflow configuration option

This option will help you remove some of the initial complexities of setting up CI/CD by ensuring your repo has the right secrets for deployment, including helping to generate the right Azure Service Principals and publish profiles. If you are using GitHub repositories, please give this option a try!

C++

C++20 modules support is coming to CMake in Visual Studio! You can try out our experimental support now by ensuring you are supplying the /std:c++20 or /std:c++latest switches to the compiler and using the MSBuild (Visual Studio) generator for CMake rather than Ninja.

Other new features include inline hints, which give you indicators in the editor for the names of function parameters and deduced types. You can toggle this by pressing ctrl twice, or Alt + F1.

Screenshot of inline hints in C++ code

In Visual Studio 17.1 we introduced peripheral register and RTOS views for embedded developers. We are continuing to improve the capabilities of those views with usability improvements in 17.2:

  • The RTOS tool window is now hidden by default, this prevents showing a tool window with error messages that are not relevant when an RTOS is not being used.
  • When a user double clicks on an RTOS object in the tool window it adds a watch for the object.
  • When a user selects the stack pointer start/end values in the RTOS tool window it is opened in the memory window.
  • Thread awareness has been added for device targets for the call stack window.

Git tooling

We continue to work on enhancing the Git experience in Visual Studio. Line-staging support was introduced in Visual Studio 17.2 Preview and now you can also enable it in 17.2 GA by going to the preview features pane and toggling the “Enable line-staging support” checkbox.

Screenshot of Git line staging

The following list summarizes the main line-staging items we were able to address during this release:

During this release, we integrated a Git feature called the commit graph which leads to improving the performance of your Git operations and significantly improving performance in Visual Studio. We’ve observed an average of 70% performance improvement in loading branch history in the Git repository window for a repository with 332k commits when enabling the commit graph in Visual Studio.

Animation of performance improvements comparing old and new in Git tooling

We have also enhanced the detached HEAD experience by providing the option to keep or discard commits when switching to a branch and enhanced the branch checkout experience, a.k.a branch switching by adding in more options and context for when there are un-committed changes.

Screenshot of detached git commits

Enterprise Support

Version 17.2 is the second long term servicing channel (LTSC) for Visual Studio 2022.  Servicing channels provide large organizations increased flexibility over when they choose to adopt the new features that are released with minor version updates to the Enterprise, Professional, and Build Tools editions. The 17.2 LTSC release will be supported for 18 months, through January 9, 2024.

Upgrade your development experience today!

On behalf of the Visual Studio entire team, we’re grateful for your continued feedback and ideas you have to help provide you with the absolute best development tools for you. We’ve packed a bunch of updates small and large into Visual Studio 17.2 and encourage you to update your development environment today and experience all these features noted here, but also a bunch of great performance improvements across all the workloads.

What’s next – Visual Studio 2022 17.3

Today we’re also releasing the first preview of the next release, Visual Studio 2022 17.3 Preview 1. This is the main preview build that provides the tooling support for .NET MAUI development using Visual Studio.

Screenshot of .NET MAUI workload selection in setup

The .NET MAUI team is excited to bring this unified platform experience of development to Visual Studio 2022 and thanks to all of you that have provided feedback as you’ve come along for the .NET MAUI journey with us and endured the initial setup scripts, workload updates, etc. If you are developing for .NET MAUI, Visual Studio 2022 17.3 Preview 1 is the tool that you want to get today as well.

To give the latest preview a try, look at the Visual Studio 2022 Preview channel page for more information. Note that you’ll be able to install it side-by-side with the 17.2 GA release. .NET MAUI isn’t the only improvements we are making in the next version as we continue to add capabilities for .NET and C++ developers in this release. For full details on the 17.3 Preview 1 release, refer to the release notes.

Share your feedback and help us build a better Visual Studio!

As you use Visual Studio, let us know what you love, what you like, and where you’d like us to improve. 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.

As always, we appreciate the time you’ve spent reporting issues and hope you continue to give us feedback on how we’re doing and what we can improve.

126 comments

Leave a comment

  • schbaem

    Finally there is an option to create projects without top level statements. Took only about half a year to give a choice, yikes.

    @PS: The website in regards to comments is as broken as ever. If you are not logged in and select the second page, most of the comments vanish…

  • Ryan Buening

    Peek Difference is not showing as an option after updating to 17.2 in my .cs or .razor files. Do I need to enable a setting?

  • Sebastian Kruse

    How do I downgrade my VS? 17.2 is not useable it does stuff all the time in the background wirh a Xamarin.Forms project keeping context menus to disappear and the error list to appear… the messages at the bottom just say “Restore NuGet package” over and over again… Thats one more time a upgrade just breaks everything because M$ is not capable of testing their stuff…

  • Daniel deLesdernier

    I didn’t see anything about getting charts and graphs working again. When will this happen? They’re pretty fundamental controls like text boxes and buttons.

  • Roberto Mencia Franco

    After installing the latest version, I have even more exceptions than in the 17.1.
    I would recommend not to upgrade. The list of the issues with this new version is already several pages long.

  • Andrey Shevchenko

    Another awesome update! With 17.2 I can’t build my Unreal Engine project anymore. Isn’t it wonderfull?
    It’s even better than 17.1! Because in 17.1 there was a bug in compiler breaking dependend operator new lookup and you could at least see in the output window.
    In 17.2 there is nothing in output and zero clues what’s going on. Better than ever!

    PS. Something is terribly wrong in Microsoft VS team. Every update breaks the next floor of sanity.

  • Jing Zhe Shan

    Possible sync all those awesome features with Mac version visual studio : ), I have been stuck with Rider on iOS for few months now and keen to switch back to use VisualStudio if I can.

  • Kryštof Žáček

    Nice job with the razor editor. It is a much needed significant progress – snippets, formatting etc. The intellisense speed still needs improvement (CSS classes completion is still lagging) but anyway thanks and keep up the effort. Blazor and Razor are great technologies and deserve first class tooling.

    • Ian Marteens

      … and the Blazor compiler complains about component namespaces, even when added to _Imports.razor. This must be what today some people call “progress”.

  • Jason Finch

    This release seems bugged, have installed on 3 PC’s now, experiencing issues with projects unloading shortly after loading on startup. Hoping there is some way to downgrade to 17.1.