The 12th update to Visual Studio 2022 is packed with lots of exciting new features that users have been asking for! Here are some of the awesome highlights from this release that are some of my personal favorites. For all the details, be sure to check out our release notes.
Copy from the Error List
You see an error in the Error List that you don’t know how to fix. So, you select it and hit Ctrl+C to copy the description for a web search. After you’ve pasted it into the search engine, you realize it copied all column headers and row values instead of just the description. Now you must delete everything except the error description before you can perform the web search. This is cumbersome, but now we have a fix!
When you copy an error from the Error List using Ctrl+C, only the description is copied to the clipboard. This makes it easier to search for the error online or share it with others.
You can still copy the entire row by right-clicking the error and selecting Copy Row from the context menu or hitting Ctrl+Shift+C.
If what you wanted to do with the error description was to do a web search, then just hit Ctrl+F1 to search for information about the error online.
Go to line anywhere in code search
Sometimes you know that there’s an issue on a certain line in your code and you want to get to it quickly. Maybe you were told about an error being thrown on line 43 of some file, or you want to get to the bottom of a specific file.
Code search now supports quick navigation to a specific line in your code.
Open Code Search and go to a line in the current document by using colon + line number. For example, :39 will navigate to line 39 in the active file.
You can also go to a line in a different document by using file name + colon + line number. For example, Order:43 will navigate to line 43 in Order.cs. If you don’t specify the exact file name, then the search will try to find the best match.
Dock the code search window
If you need Code or Feature Search to stay out of your way, you now have more control over the behavior of the search window.
You can now dock the search window and perform tool window actions with it, like Solution Explorer and others.
After opening Code Search or Feature Search, click on the box icon at the top right to convert it into a tool window. You may choose to dock it elsewhere, pop it out, auto-hide, etc. You can revert to the dismissible window by closing the tool window and reopening search.
We’ve also simplified and cleaned up the previewing experience in search. There is now one button, indicated with an eye icon, to toggle the preview on and off.
The position of the preview panel will also adjust based on the dimensions of the search window.
Refresh the Find results
We heard from a lot of users that it’s frustrating having to reopen the Find window and go through the motions of redoing a search to get updated results. Maybe you just refactored some code and want to confirm everything has been changed as expected, or you pulled some recent changes and need your recent Find operation to reflect those updates.
After completing Find in Files, you will now have the option to Refresh the Find results in the window. You’ll get your updated results without having to redo the search.
We’ve also redesigned the former Repeat Find option to distinguish it from Refresh. It is now represented as Modify Find with a pencil icon. This button will still reopen Find in Files with the same search criteria you used for that results window.
Copy files between instances
We are excited to introduce a highly requested feature in Visual Studio! You can now seamlessly copy and paste code files and folders between different Visual Studio instances using the Solution Explorer. Simply select the desired file or folder, use Ctrl+C or Ctrl+X, switch to another Visual Studio instance, and use Ctrl+V to include those files or folders in your new solution. All changes will be accurately reflected in the file system.
In addition to copying and pasting, you can also drag the files and folders from one instance of Visual Studio to another.
Previously, this functionality was available only for a few project types, but we have now expanded it to include all the major project types in Visual Studio.
Multi-project launch configuration
The Multi-Project Launch Configuration feature allows you to set up and save profiles for launching specific projects within a multi-project solution in predefined states for debugging.
This simplifies the process of working with complex solutions, improves debugging efficiency, and enables easy sharing of configurations among team members.
Thank you!
We deeply appreciate your valuable feedback and feature requests, which have been instrumental in shaping these updates. Your insights have a profound impact on our development process, and we are committed to continually enhancing your experience with Visual Studio. We encourage you to keep sharing your thoughts and suggestions, as they are vital in helping us make Visual Studio the best it can be. Thank you for your continued support and collaboration.
Happy Coding!