May 10th, 2022

Visual Studio 2022 17.2 is now available!

Tim Heuer
Principal Product Manager

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.

Source Link

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.

Author

Tim Heuer
Principal Product Manager

Tim has been working as a software developer with Microsoft technologies for years, having specialized in emerging technologies and UI frameworks. As a self-taught developer, he appreciates the passion for learning and sharing with others to help everyone be successful in their quest for successful compilation! He derives a lot of joy by interacting with developers regularly and learning more from them through what they are trying to accomplish with tech.

134 comments

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

  • Sergey Kipnis

    Ctrl-Shift-F still works INSTABLE. I have even funny screenshot, where good old Far Manager finds 4 files and Visual Studio just one.

    How could it be possible to break search in files? I do not understand.

  • Sergey Kipnis

    New killing feature available approximately since 17.2.2

    MS Visual Studio is now able to LOCK souce file. Micosoft Windows is at all stupid in file locking(compared to modern OS, like Linux),
    but MS Visual Studio is now able to exploi this.

    Fail Case:
    1. Edit some files in Visual Studio and, this s important, debug & test
    2. Switch to git(!).
    3. Stash changes.
    You can't!
    Save Stash: unable to write file '.../core.h' mode 100644: Permission...

    Read more
  • Sergey Kipnis

    This is not the end...

    I would like to say, that most of the error had been fixed in 17.2.3.
    But now Google Test Adapter works quite unstable.
    It means that the Adapter reports warning debug file not found
    And may hangs up in discovering. With probability 80%
    You have to restart Visual Studio and try again. And again.
    This is absolutely inappropriate. May be in Microsoft working without a testing is normal, but not in...

    Read more
  • Marco Conca

    When will VS 17.3 get out of preview?
    Will .Net MAUI be part of the 17.3 stable release?

  • Gregory Jaegy

    Just updated to 17.2.2, I get numerous errors of components that can't be loaded, solution explorer as well, tons of error dialog messages, etc.
    I've tryied to "repair" through the installer, it seems to work afterwards, however, as soon as I re-install some extensions (Qt plugin, visual assist), the errors are back.
    So, basically VS is not usable anymore on my system and I can't work :/
    Are you aware of that issue ? How...

    Read more
  • Sergey Kipnis

    This is not the end of the story

    – Address sanitizer, mostly responsible for memory eating. 400MB in 10 minutes. Oh, really?
    – Memory profiler doesn’t work anymore ” the diagnostic tool does not support the current debugging configuration”

    I could say “Visual Studio 2022 in it current state is UNUSABLE

    Literally any competing product is better. ANY/

  • Sergey Kipnis

    Yet another surprise

    Debugger is hardly usable now

    bool a = true;
    if(a) {
        exit(11);
    }
    printf("ok");
    

    It is unbelievable, but execution pointer jumps first to exit(11) and only after jumps to printf()

    WTF?

  • Sergey Kipnis

    Oh, another two great points, I have found today.

    1. IntelliSense may not work. Just stop working and voila. And you get nothing.
    2. Find in Files may not work too! And this is great addition to the p.1

    So, dear Microsoft engineers, tell me how it is possible to use IDE without grep and IntelliSense?

  • Sergey Kipnis

    Ah, and yet another killing feature. Focus. Latest release Visual Studio returns focus randomly back! For example, you are sitting in RDP and trying to understand what doesn’t work, bum! You are back in Visual Studio. What a nice idea!

  • Sergey Kipnis

    Even Find box is broken now.

    If select something in text and click Ctrl-F instead of selected text in find box you will find onr(!) char(!) after selected text.

    Microsoft, please, stop breaking the good product!