November 21st, 2024

Making you more productive with Visual Studio v17.12

Mads Kristensen
Principal Product Manager

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!

Select an error with options to Copy, Copy Row, and search for help on the Web

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.

inputting :39 and cursor goes to line 39

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.

order:43 was entered and it took the curser to file Order line 43

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.

Search window is docked below the code

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.

highlighting the convert to tool window option

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.

highlighting the preview icon

The position of the preview panel will also adjust based on the dimensions of the search window.

Search window on the right, size has been adjusted

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.

highlighting the refresh icon

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.

highlighting the modify find option

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.

gif dragging an dropping files between instances of VS

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.

Gif showing the multi-launch config experience

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!

Author

Mads Kristensen
Principal Product Manager

Mads Kristensen is a principal program manager on the Visual Studio team and has published over 150 free Visual Studio extensions. He blogs about anything related to Visual Studio and can often be found hosting various shows on the Visual Studio YouTube channel..