The other day I was asked if it was possible to find out if a specific string ever had occurred in the source files of a specific project. As this is not possible in TFS out of the box today I said that it could probably be done in a couple of hours if needed.
Creating a search function
Quite soon I was asked to put my money where my mouth was:) So I developed an Visual Studio Extension that, using the tfs api, would loop through each file and each file revision. As this would be a quite intense operation I placed it as a new feature in the TFS administrators Toolkit. I have some ideas to make it available as a standalone VS extension, extending source control explorer with a Find in File context menu, but at the moment it’s a TFS Administrators toolkit feature only.
Find in Files window
The result of my effort is the new Find in Files window in TFS Administrators Toolkit. It enables you to search for text in the content of source controlled files. Amongst its features is
• Search files in source control matching selected wildcards
• Option to search in History, searching through each file revision.
• Option to search case sensitive or not
• Option to search using Regular Expressions
Update!!! The Find in Files feature is availble in both VS 2010 and 2012. The 2012 version is updated with more features, as Search result prview, Source Control Explorer integration and more...
You can download the TFS Adminsitrators Toolkit from Visual Studio Gallery at
VS 2012 http://visualstudiogallery.msdn.microsoft.com/96a425aa-9ef0-4a92-b874-217d544a74bf
VS 2010 http://visualstudiogallery.msdn.microsoft.com/11f5e313-ced1-4713-9794-d7300c7d12e0