Visual Studio 2022 17.1 is now available!

Dominic Nahous

Correction: We mistakenly indicated that a new feature for automatically saving files when Visual Studio moves to the background was available in the 17.1 GA release. This feature is only present in the 17.2 Preview release. We’ve since updated the post to fix our error.

Today, Visual Studio 2022 17.1 graduates from preview and reaches general availability. Feedback from developers like you have helped us shape and refine Visual Studio 17.1 through its preview cycle and we’d like to thank you for your part in Visual Studio’s journey.

In my last blog post for Visual Studio 2022 17.1 Preview 2, I shared details around exciting additions to Visual Studio that included enhancements in Git, Search and Navigation, productivity improvements in C# and C++, and added capabilities for personalizing colored tabs. Throughout the rest of the 17.1 Previews, we continued to address feedback you submitted via Developer Community. To see the full list of community feedback we’ve addressed, visit the fixes page on Developer Community.

In addition to fixes for customer-reported issues, we’ve also added made some changes to make you more productive in Visual Studio. You’ll also find improvements to solution close performance as a result of optimization of cleanup operations when closing a solution, which builds on the performance work we’ve been doing throughout the preview cycle. Continue reading to find out more, and as always, visit the Visual Studio 17.1 GA release notes for more information on everything in this release.

Search code faster with indexed Find in Files

With Visual Studio 2022 17.1, we’ve turned on indexed Find in Files by default to help ensure every developer experience a faster and more productive searching experience.

With Find in Files on, Visual Studio will launch a satellite process `ServiceHub.IndexingService.exe` at solution load or folder open and then send a list of files to it to index. The indexer will then scrape through the files and construct an index which is in turn used to speed up search results when you perform a Find action.

Side-by-side video of VS 17.0 (left) and VS 17.1 Preview (right) searching about 50,000 files in 1,560 projects
Side-by-side video of VS 17.0 (left) and VS 17.1 Preview (right) searching about 50,000 files in 1,560 projects

While indexed Find in Files is enabled by default for all users, you can opt to disable it by navigating to Tools > Options > Environment > Preview Features and unchecking “Enable indexing for faster find experience”.

Do more with Git

As we mentioned in the Preview 2 blog post, Visual Studio 2022 17.1 comes with some highly anticipated Git features to help boost your productivity. You can now compare your current branch with other branches in your repository, affording you an easier way to keep track of your branches with preparing for pull requests or branch deletion.

A screenshot of Visual Studio's Git compare screen

You’ll also find enhanced detached head support with the ability to checkout a commit and checkout the tip of any remote branch. You can now checkout any commit and go back to a previous point in your repository’s history to run or test your code. You can also quickly review pull requests and evaluate your team’s updates by checking out the tip of any remote branch.

Screenshot of Visual Studio's Git history view demonstrating the ability to checkout any commit

Screenshot of Visual Studio's Git history view demonstrating the ability to checkout the tip of a remote branch

For more information on the Git improvements in 17.1, take a look at Taysser’s blog post on the Visual Studio blog.

C++ enhancements for Embedded and RTOS make it easier to be productive

We’d also like to quickly remind you about the new visualizations for embedded registers and RTOS threads that we first described in the Preview 2 blog post.

You can access the registers view through Debug > Windows > Embedded Registers, which gives you a view of all the available registers, their mapped memory locations, and values.

Visual Studio's Embedded Registers window

Opening the RTOS Objects window through Debug > Windows > RTOS Objects gives you a view of threads running in the system along with their context.

Visual Studio's RTOS objects window

Be more productive with Solution Filters

Solution Filters allow you to choose what projects to load so you can avoid loading massive solutions every time. You have the choice to load individual projects or a project with its entire dependency tree. Our users noticed the dependency tree (and solution filter) can become outdated when new projects are added, or the dependency graph changes.

Visual Studio 2022 version 17.1 added an easier way to load the entire dependency tree for all the projects in the solution filter. This will pull in any new dependencies that were added to ensure you have all the projects you need. You can check for any new dependencies by clicking Update Project Dependencies in the context menu of the solution node in the Solution Explorer. Try this out and let us know what you think!

Screenshot of Visual Studio with the new Update Project Dependencies option highlighted

Support for Enterprise Customers

Now that Visual Studio 2022 version 17.1 has been released, our Professional and Enterprise customers have the option to manage the timeframe as to when they adopt the new feature set of 17.1. To stay on the 17.0 LTSC (long term servicing channel) and receive security and quality fixes – but not feature updates – for 18 months, follow the instructions on using the Update Settings dialog. Note that this feature is not available for the Community Edition.

By default, all installations of Visual Studio are configured to use the Current channel, which will receive the 17.1 feature set immediately. Alternatively, users and IT administrators can configure installations to defer the feature update in a secure manner until you’re ready to move forward. 17.0 LTSC will not receive additional feature updates but will receive security and quality fixes until July 2023. For a better understanding of how Visual Studio is serviced and supported, refer to the Visual Studio lifecycle policy. To configure the update channel, use the Update Settings dialog or do it programmatically via script or command line.

What’s next?

We’re also shipping the first preview of the second update to Visual Studio 2022, 17.2. The latest preview release of Visual Studio 2022 includes:

  • Bug fixes and improvements for .NET MAUI development
  • Continued enhancements in the Git experience
  • Support for new C# 11 refactorings, such as a new language feature called raw string literals
  • New capabilities for local development with your data using SQLite, Postgres, and MongoDB data sources

Chunk and line staging with Git

In the 17.2 Preview 1 release, you’ll see support in Git for staging chunks of stages in your files right from the editor. To enable line staging support, navigate to Tools > Options > Environment > Preview Features and check “Enable line-staging support”.

We’ll be sharing updates on Git improvements in another blog post very soon, so stay tuned!

Keep your code files in sync automatically

You’ll also find a new feature for automatically saving files when Visual Studio loses focus on the Tools > Options > Environment > Document page. This feature is available starting in the 17.2 Preview 1 release.

Screenshot of the Environment > Documents Options page showing the "Automatically save files when Visual Studio is in the background" feature

By selecting “Automatically save files when Visual Studio is in the background” on this page, any time Visual Studio loses focus, it will try to save every dirty document in the IDE including project, solution, and even other miscellaneous files.

We hope this feature proves useful and keeps it easier for those of you who use other applications in conjunction with your Visual Studio development to develop in multiple tools. We’ll be sharing more information on this feature in another blog post soon.

New C# 11 refactorings

In 17.2 Preview 1, a new C#11 feature, raw string literals, will allow you to convert a normal or verbatim string literal to a raw string literal. To use raw string literals, first set the language version in your project file to preview using `<LangVersion>preview</LangVersion>. Then, place your cursor on a normal or verbatim string in the editor. Finally, press CTRL+. To trigger the Quick Actions and Refactorings menu, then select “Convert to raw string”.

A screenshot of a computer Description automatically generated with medium confidence

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.1 GA release. For full details on the 17.2 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.

35 comments

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

  • Paulo Pinto 0

    The feedback to make C++/WinRT developer experience beyond using OLE 2.0 with Visual C++ 6.0, since C++/CX was deprecated about 5 years ago, keeps being ignored, so why bother when customer experiences get downgraded without consideration.

  • MgSam 0

    I’d never heard of Solution Filtering before this blog post. And I’ve been reading MSDN blogs for over a decade. You guys really buried this feature, both in documentation and in the IDE.

    This feature sounds useful in concept- however I don’t really understand the implementation based on the documentation: https://docs.microsoft.com/en-us/visualstudio/ide/filtered-solutions?view=vs-2022. It seems like all a “Filtered Solution” is doing is keeping track of what projects should remain loaded vs unloaded? Why does this need to be a new file type with a special set of commands to enable it? Why not just store the loaded/unloaded status in the regular solution file itself? This feels more like a hack than a proper IDE feature…

    • Kevin McFarlane 0

      I think the feature has been there since at least VS 2017. I’ve not really used it though. VS is so big that there will be lots of features you’re unaware of. In practice I often discover them by sitting with another dev and seeing them do something I was unaware of. We all work in slightly different ways. 🙂

    • Tsahi 0

      I think this would be developer-specific, depending on what projects s/he is working on, so it doesn’t make sense to store it in the solution file.

  • Thierry Pélissier 0

    Bonjour,
    Je n’ai pas l’option :
    “Enregistrer automatiquement les fichiers lorsque Visual Studio est en arrière-plan”.
    Faut il choisir une option autre ?

    • Jens Samson 0

      I have the same problem : “Automatically save files when Visual Studio is in the background” does not show up in the options.

    • DMtfl 0

      I have the same problem : “Automatically save files when Visual Studio is in the background” does not show up in the options.

      • Dante GagneMicrosoft employee 0

        Hey folks, I do apologize, but there was an error in the release notes here. The “Automatically save files when Visual Studio is in the background” is not available in 17.1 yet. It *IS* available in 17.2 preview 1, which is now available.

        I apologize for the confusion that this has caused, and if folks have feedback about the new feature, please don’t hesitate to pass it on. https://developercommunity.visualstudio.com/home

        • Jens Samson 0

          At least you know we actually read the release notes 😉

          • Thierry Pélissier 0

            Bonjour,
            Pas de mise à jour vers la 17.2 1. Est ce normal ? J’ai que 17.1

            Hello,
            No update to 17.2 1. Is this normal? I have only 17.1

  • Roberto Mencia Franco 0

    Checking the release notes I can’t see if “Hot Reload” for Blazor is finally working during Debugging. Probably one of the most important features for Blazor.
    It was said that it was going to be released in 17.1, but I can’t see it in the list.

    • Graeme Grant 0

      Yep, I was expecting the fix to be there too. It was confirmed as being fixed & included here: [Fixed] Blazor Hot reload not working when debugging

      Just updated, loaded a project, and it now works…

  • Heresy K 0

    There is no “Automatically save files when Visual Studio is in the background” option after upgrade to 17.1.0 in my computer
    https://imgur.com/TkQyuTz

  • Jens Samson 0

    Sticky DataTips does not show up in the options.

  • Benjamin Bartels 0

    Breaks syntax highlighting in my blazor project: @code-block in a .razor file is mostly gray but lights up with regular colors every second or so – regardless of theme

  • Federico Berasategui 0

    Problems with source generators randomly crashing and showing brown bars in the upper part of the screen in Visual Studio still persist.

    I was hoping this release would fix that.

  • Tobias J 0

    I just updated my VS 2022 Professional to 17.1 and the “Automatically save files when Visual Studio is in the background” option is not there for me on the Documents page; is it Enterprise only?

    • Dante GagneMicrosoft employee 0

      Hey Tobias, I do apologize, but there is an error in the release notes and this blog post. The Automatically save files when Visual Studio is in the background is only available in the 17.2 Preview 1 channel at this time. I thought it was going to be in 17.1 GA, and was incorrect. I do apologize for any inconvenience there.

  • Jacob Stamm 0

    Those raw string literals coming in C# 11 look slick. If I can one day do something like this…

    var rawStringLiteral = """html
                           <div>Some html</div>
                           """;

    …and get syntax highlighting similar to most markdown syntaxes, I’ll be over the moon.

  • Joseph Musser 0

    It’s really confusing that the C# 11 raw string literals feature is included in this “17.1 now available” blog post. The clarification that this requires using 17.2 Preview 1 is hidden at the end of the section. Maybe the section could be titled “New C# 11 refactorings in 17.2 Preview 1”?

    • Dominic NahousMicrosoft employee 0

      Thanks for the feedback, Joseph! I’ve added additional information to the first sentence of each of the subsections in the “What’s next” section to stress that they’re all 17.2 Preview 1 features.

  • Adin Aronson 0

    Good Changes Dominic.

    Talking about Git. It would be good to be able to compare a modified (none committed) file to a previous version.
    Currently you can only compare to the “Unmodified” version of the file.

    Cheers

  • Martin 0

    Hello,

    very nice feature to support embedded / microcontroller projects in VS. Is there any information available about which debugger hardware is supported (for example JTAG, SWO on Segger J-Link or Microchip/Atmel ICE)?

    Thanks

  • Andy Pullis 0

    How do we adjust the font size of the inline diagnostics? I find it too small and a little difficult to read.

    You can now understand errors and warnings at a glance without needing to hover your cursor over a line of code with Inline Diagnostics. Inline Diagnostics is disabled by default so you will need to enable it in Tools > Options > Text Editor > C# or Basic > Advanced and select Display diagnostics inline (experimental). Inline Diagnostics

  • John 0

    With VS 2022 17.1 (Preview) I could select MAUI project template from the ‘Create a new project’ dialog. Now that 17.1 has been released, I can’t find the template in the list. When I look at https://docs.microsoft.com/en-us/dotnet/maui/get-started/first-app it seems the MAUI project template has been pushed to VS 2022 17.2 (Preview). Can someone please tell me what is going on?

  • Thaddeus Onindi 0

    Thanks for this, i am enjoying the 20222 version

  • MgSam 0

    When is C# Interactive going to be updated to .NET Core? It’s really crazy how you guys shipped this feature 7 years ago at this point and abandoned it almost immediately.

  • Spaso Lazarevic 0

    What about working with old Windows Forms in VS 2022. Will be fixed or no plan?

    • Alexander Gayko 0

      what doesn’t work for you?

  • Dan 0

    I really wish I could reverse these updates easily. This update (17.1.0) has ruined my development environment. When working in an Angular/typescript project, the project will completely flake out after a few quick edits. It’s the old ‘Running low priority background processes’ bug again, where it becomes too busy to keep up with what I’m working on. My syntax coloring will go away making the whole page black and white, and intellisense stops working.

    Additionally, VS will now infinitely hang, when I choose ‘organize imports’. It’s an old bug from back in 2017 if I recall. It will bring up a dialog, and clicking the ‘cancel’ button does nothing. The other day, I left it to ‘process’ while I went to lunch. Came back an hour later and it was still ‘processing’. Had to force close VS to be able to work again.

    VS 2022 has become very unreliable for me, even prior to this patch, but now I’m beginning to get hesitant at doing updates. I can either deal with the issues I have now, or gamble that they are resolved in the update, and don’t introduce a bigger issue. For example, the only reason I installed this update, was in the hopes of fixing a Git issue, where VS will lock up, if I click ‘create pull request’ too quickly after I used ‘commit and push’.

    • Andy Bolstridge 0

      True. Right now I’m seeing a bug restoring VS from the taskbar – others have seen this too and its insane. The quality of VS seems to be turning into a crapfest of junk code if unminimising VS requires some interaction with the clipboard.

      The drive to add new features is making everything worse.

    • Del Woodcock 0

      I too have had a lot of issues with 17.1.0, missing properties, hangs up on rebuilds, locks another solution when copying from one solution to another, etc…
      I have to kill the processes half the time and restart it. The new features are great, but I spend more time working around the bugs.

  • Alaa Serry 0

    Hello Dominic,

    Yesterday, I updated to Microsoft Visual Studio Community 2022 (64-bit) – Preview
    Version 17.2.0 Preview 2.0. This upgrade broke my existing code!

    I would like to revert to Version 17.2.0 Preview 1.0. I am having a hard time locating the download of this Preview version. Would you kindly advise as to where I can find the download or send me a download link.

    Thank you kindly
    Alaa

    • Dominic NahousMicrosoft employee 0

      Hi Alaa,

      We’re really sorry to hear you’re having an issue with the 17.2 preview release breaking your existing code. At the moment, we don’t have an easy way for you to revery back to the 17.2 preview 1 release, but we’d love to work with you to fix the issue you’re seeing.

      If you haven’t already, please report the problem to us via Developer Community. You can also link the report here for me so I can help follow up on the report.

      Cheers,
      Dominic

Feedback usabilla icon