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.
- 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:
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."
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 at Converge 360.