visual-studio-2008searchtfscode-search-engine

Find in Files: Search all code in Team Foundation Server


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.


Solution

  • 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