Find in Files: Search all code in Team Foundation Server

Mark Glorie picture Mark Glorie · Sep 3, 2008 · Viewed 107.7k times · Source

Is there a way to search the latest version of every file in TFS for a specific string or regex? This is probably the only thing I miss from Visual Source Safe...

Currently I perform a Get Latest on the entire codebase and use Windows Search, but this gets quite painful with over 1GB of code in 75,000 files.

EDIT: Tried the powertools mentioned, but the "Wildcard Search" option appears to only search filenames and not contents.

UPDATE: We have implemented a customised search option in an existing MOSS (Search Server) installation.

Answer

Grant Holliday picture Grant Holliday · Sep 17, 2008

Team Foundation Server 2015 (on-premises) and Visual Studio Team Services (cloud version) include built-in support for searching across all your code and work items.

You can do simple string searches like foo, boolean operations like foo OR bar or more complex language-specific things like class:WebRequest

screenshot of code search filter syntax

You can read more about it here: https://www.visualstudio.com/en-us/docs/search/overview