Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Limit search to specified Folders or File Types in Visual Studio?

Is there a way to limit a search (via the "Find and Replace" dialog) in Visual Studio to specified folders or file types?

like image 737
Bryan Avatar asked Apr 27 '09 23:04

Bryan


People also ask

How do I search all folders in Visual Studio?

In Visual Studio 2022 and later, you can set Visual Studio to always keep results. Go to Tools > Options > General > Find and Replace, and select the checkbox for Keep search results by default.

How do I search multiple files in Visual Studio?

Search across files# VS Code allows you to quickly search over all files in the currently opened folder. Press Ctrl+Shift+F and enter your search term.

How do I search for a specific directory in VSCode?

VS Code allows you to quickly search over all files in the currently-opened folder. Press Ctrl+Shift+F and enter in your search term. Search results are grouped into files containing the search term, with an indication of the hits in each file and its location.

How do I search for a file in Visual Studio?

Ctrl + Shift + T.


2 Answers

Yes, in the find/replace window you can:

  • specify the file types in the "Look at these file types" option
  • and choose the folders in the ... button of the "Look in" option.

Find and Replace Window

like image 171
Fabio Vinicius Binder Avatar answered Oct 12 '22 11:10

Fabio Vinicius Binder


I can't believe this issue still exists in VS2015. We have a solution explorer folder tree. Why is "Current Selected Folder" not an option in the drop down. The "..." doesn't default to starting in the solution folder, I have to browse across the network to t the share, then drill down through all the folders to get at a folder that is ALREADY right there and selected in the solution explorer. Dreamweaver has had this functionality for its search for at least a decade (maybe longer).

like image 23
Wolfie Avatar answered Oct 12 '22 12:10

Wolfie