New: Better search in Visual Studio

Leah Tran

Whether you are looking for specific code files, classes, methods, or features and options in the IDE, finding them is not always easy. With multiple ways to search, how would you even know which one to choose? The new All-In-One Search combines code and feature search into the same UI and adds some extra power and productivity to the experience.

Image All in one search

To enable the new search experience, go to Tools > Options > Environment > Preview Features > New Visual Studio Search Experience. After doing that, and restarting Visual Studio, you’ll now see the new search button appear in the title bar, as shown in the screenshot below.

Image All in one search split button

Ctrl + T for code search and Ctrl + Q for feature search stay the same, so your muscle memory remains intact.

Quickly find files, symbols, and Visual Studio features

Results for files, types, and members are prioritized in the Code Search tab (Ctrl + T) to help you navigate directly to the places where symbols are used. You can further narrow your search to just one of these filters with the buttons below the search bar or by prefixing your search with “f:’, “t:”, or “m:”.

In addition to fast symbol navigation, the Feature Search tab (Ctrl + Q) provides easy access to the various tools, options, templates, and components available in Visual Studio.

Preview and edit your code in the search window

Alongside your list of search results, you’ll see a preview of the selected result. You can glance over to get immediate context of a result without needing to open it and even make tweaks to your code right in the search window. All file types, C# types and members, and C++ types and members are supported in the preview panel.

Configure the preview location by toggling the icons at the top right of the window.

Image All in one search toggle buttons

To see the new all-in-one search in action, check out this short demo video:

Try out the new search experience early in the 17.5 Preview builds! What do you think about the new search? Let us know in the comments below.