News

Visual Studio 2022 17.1 Now Generally Available

Microsoft shipped the first update to Visual Studio 2022, version 17.1, with faster code search, synched code files, Git improvements and much more.

That last item, Git improvements, was the focus of Visual Studio 2022 17.1 Preview 2, which shipped last month with these four new features:

  • Compare branches -- compare a checked-out branch with any local or remote branch. This feature provides an overview of differences between two branches which can be helpful in preparing a pull request, merge or deletion of a branch.
    Comparing Branches in Animated Action
    [Click on image for larger, animated GIF view.] Comparing Branches in Animated Action (source: Microsoft).
  • Checkout commit -- checkout the tip commit or any previous commit of remote and local branches. Checking out the tip of a remote branch helps developers quickly review a pull request and evaluate the latest updates.
  • Multi-repo branching -- manage and create new branches on all active repositories at the same time. Among other functionality, this lightweight branch management experience helps developers include updates from different remote branches. A developer can merge changes from someone else's branch by right-clicking on the branch under the Remotes tab and selecting Merge into Current Branch.
  • Line-staging -- split changes across different commits by staging sections of code changes. Sometimes called "interactive staging," this is described as one of the most popular Git suggestion tickets. This is a work-in-progress preview and the dev team is still enhancing the small number of features included in Preview 2, so there are some known issues and limitations.

Meanwhile, faster code search was a focus point of Visual Studio 2022 17.1 Preview 3. "Visual Studio 2022 Find in Files is already more than 2x faster for 95 percent of searches compared to Visual Studio 2019," said product manager Denizhan Yigitbas at the time. "We wanted to make code search even better. I am excited to announce that Visual Studio 2022 17.1 Preview 3 introduces indexed Find in Files to make your search experience even faster!"

Here's a look at code searching improvements from VS 2019 to VS 2022:
Code Searching Improvements from VS 2019 to VS 2022
[Click on image for larger view.] Code Searching Improvements from VS 2019 to VS 2022 (source: Microsoft).

That functionality was also highlighted by Dominic Nahous, senior lead program manager for Visual Studio, in a Feb. 15 blog post announcing general availability.

"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," Nahous said. "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 Animated GIF of VS 17.0 (left) and VS 17.1 Preview (right) Searching About 50,000 Files in 1,560 Projects
[Click on image for larger view.] Side-by-Side Animated GIF of VS 17.0 (left) and VS 17.1 Preview (right) Searching About 50,000 Files in 1,560 Projects (source: Microsoft).

The new update also features a new checkbox in the Tools > Options > Environment > Document page to "Automatically save files when Visual Studio is in the background" that appears when the IDE loses focus.

"It will try to save every dirty document in the IDE including project, solution, and even other miscellaneous files," Nahous said. "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++ enhancements include beefing up embedded development with new views that enable coders to inspect and interact with peripheral registers on microcontrollers and real time operating systems (RTOS) objects.

There's also a tweak to Solution Filters functionality, which let developers selectively load and work with needed projects. "For instance, if you work in a repository with hundreds of projects, you may only need a fraction of them," Microsoft guidance says. "Solution Filters will simplify your work, with a clear distinction between which projects are loaded and unloaded. Anytime you open or close the solution, Visual Studio will remember and load the projects that were loaded in the previous session."

In this week's new update, Nahous announced a Solution Filter productivity tweak: "As a result of feedback from users like you, we've added an option to load or reload the entire dependency tree for the projects in your Solution Filter," he said. "When new projects are added to the dependency tree but haven't been manually added to your Solution Filter, you can easily add all the dependencies at once."

The new option to "Update Project Dependencies" can be found in the context menu of the solution node, available by right-clicking on the solution in the solution explorer.

Along with the GA release, the dev team also shipped the first preview of Visual Studio 2022 17.2. Going forward, Nahous listed these work items:

  • 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

More information on all of the above and many other items are available in the release notes, along with a Developer Community fixes page. Also available are v17.2 preview release notes.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube