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.

31 comments

Discussion is closed. Login to edit/delete existing comments.

  • Tristan Cormier 0

    Man, and I just renewed my Visual Assist subscription for another year! 😂
    Seriously though, I’m glad that the team is working on features that we have had to get from a third-party for so many years.

  • John B 1

    Looks good. I wonder if a single, omni- search would be nice.

  • MgSam 0

    I can’t say why, but the search in the title bar (which was for searching for VS features) has become completely broken for me in the newer releases. It was fast and effective when you guys first released it a few years back, in the newer releases it returns terrible results or just hangs VS completely.

    • Leah TranMicrosoft employee 1

      Hello MgSam, I’m sorry to hear that you’ve been hitting issues with the search experience. We’re working on improving the reliability and it would really help us if you could share your experience.

      Do you have any examples you can share of when it returns terrible results?

      And if you encounter hanging issues again, would you be able to follow the instructions on this page to help us figure out the issue?

      • Rosato Gino 0
  • Larry Sall 1

    Odd, I’m running VS 17.4.4 and I don’t seem to see this option as posted herein. What version is this available in just the latest previews?

    • Edhy Rijo 0

      I don’t see it either on VS 17.4.4.

      • 🌊#️⃣ 1

        As of now you need to be on version 17.5.0 preview.

        • Andy Tate 5

          Would have been nice if the main article stated this

    • Leah TranMicrosoft employee 0

      Hello Larry, this new search experience is available in the 17.5 previews. Thank you for asking this question! I will update the blog post to reflect this.

  • Sunil Joshi 3

    One feature that’s nice in JetBrains IDEs is that their equivalent search looks into library symbols as well (e.g. dependencies). This can be useful when you’re trying to look through a library to study the API etc. I notice that this feature doesn’t do that, but I think it would be a good idea to have as an option.

    • Leah TranMicrosoft employee 0

      Thank you for the suggestion Sunil! Would you be able to comment this on this Developer Community ticket to help us keep track of the feedback?

  • Richard Deeming 0

    Looks good. However, this feature seems to be in perpetual preview. You’ve been talking about it since 17.2 preview 3, back in April, and it has yet to appear in any non-preview version of Visual Studio.

    I appreciate there may still be areas where it can be improved. But surely there has to come a point where what you’ve got is good enough to replace the current search, and it gets pushed to the release channel?

    • Josh Harmon 0

      I’m relieved to know I’m not the only one who was wondering about this. If I’m not mistaken based on my Googling and Bing’ing (“site:devblogs.microsoft.com all-in-one search”), this is the fourth post about this preview feature, and I’m having trouble discerning what if anything has been changed since the last update post in June. Posting about the same preview feature over and over for an extended period of time causes confusion, as is evident from some of the other comments here — at some point readers will simply assume the feature has shipped for real!

      I eagerly await the day it ships, nonetheless!

    • Leah TranMicrosoft employee 1

      Thanks for your comments Richard and Josh! We’ve been working hard to ensure that this feature is ready to replace parts of the current search experience. Since it’s such a high traffic feature, we’re taking extra care on both visible (UI) and more hidden (performance) aspects to make sure we’re getting it right. We believe we’re nearing the finish line, so stay tuned for updates! We would love to hear if you think this feature is ready (or not), so let us know what you think by submitting feedback on this ticket in Developer Community.

      • Stevie White 0

        That makes a lot of sense as to why you’re taking so long to replace it. Depending on how well it does, you might break my VS Extension habit. 😉

  • Roland Wales 0

    I have the latest version of Studio 2022 and ‘Preview Features’ is not available when I searched for Search.

    I find it useful to search sub directories within an application. I use Visual Studio Code for this. It’s helpful to distinguish between application code and third party products such as Bootstrap when searching.

    • 🌊#️⃣ 0

      Are you on the preview version? You need to be on 17.5.0 preview. I was able to search that on the preview version and it showed up.

    • Leah TranMicrosoft employee 0

      Hello Roland, I wanted to confirm that this new search experience is available in the Preview channel version 17.5.0 and on. I’ve updated the blog post to clarify this. Thank you for asking!

    • Leah TranMicrosoft employee 0

      I’m glad to heard that you’re excited for it to be released Devon! We’ve been working hard to ensure that this feature is ready to replace parts of the current search experience. Since it’s such a high traffic feature, we’re taking extra care on both visible (UI) and more hidden (performance) aspects to make sure we’re getting it right. We believe we’re nearing the finish line, so stay tuned for updates! If you’ve been able to try it out, we would love to hear if you think this feature is ready (or not), so let us know what you think by submitting feedback on this ticket in Developer Community.

  • Agrael Lee 1

    How can we search a Class (or interface/enum) from lib ? (c#) ReSharper and Rider can do it easily.

  • Robert van der Hulst 0

    Can you please provide a link to the documentation of what a 3rd party vendor needs to do to be included in this new Search Feature?

  • Guy 0

    Can I change the keyboard binding to CTRL-F?

  • Krystof Zacek 0

    The preview in Ctl-T is NOT editable (I can weirdly insert new line but NOT type code).

  • Roger Pence 0

    The new search is very promising–and quite fast. However, it doesn’t search through my .VUE files. Can you configure what files in the project get searched?

  • Dusan Lazarevic 0

    Looks good, but sometimes when I use shortcut to search for files, the input field selects the whole line, including “f:” instead of the right part only. So I accidentally search for all code instead of just files, which makes it pretty unusable. It usually happens after a few searches, not in the beginning.

  • zheyu zhang 11

    Hi. In the old version, Alt + \ will to search member from current class, now it will search all class. How to search member only in current class or file.

  • Joel Deziel 6

    When I use Alt + \ I want to search just the current class or file. The speed of the new search in Ctrl + T is very impressive, but I would at least want the results from the current class to be on top.

  • Neironari 4

    That’s very great news, but still no case sensitive, whole word search. It looks great but almost unusable.

Feedback usabilla icon