Here’s a quick Visual Studio tip for you…

I frequently search for a specific text in my solution because I need to do something in all places where that text occurs. Today I found out how you can open all the files that are mentioned in the Find Results window.

Search for the text you’re looking for. In my case this is ITest*.
Open up the Search Results window and select all the records where the text was found. You can do this by dragging your mouse cursor over the text or clicking the text of the first search result, holding SHIFT and clicking the text of the last.

Search Results for ITest

Right click anywhere on the selected text and choose ‘Go to location’. If you click anywhere other than on selected text, you will lose the selection and you’ll probably get just one file opened. When all files are opened you will keep the ‘Go To Next Location F8’ and ‘Go To Previous Location SHIFT + F8’ functionality. That might be a nice one to loop through all the locations where your text was found. Especially when it was found more than once in one file.

Hope this helps.


* The usefulness of searching for this interface is arbitrary due to functionality as ‘Find all references’ and so on. Luckily I’m only using it for this example. So lets not focus on that but on the tip this post is about 😉