I installed linqpad a while ago and recently I came across some articles on how to use it to query against tfs. Basic queries like checkins and checkouts and things of that nature. I have had mostly success with running those queries. Then I see this website showing that it is possible to query against tfs with linqpad basically giving you the ability to do a codesearch with linqpad. So I spent a very good amount of time attempting to get this to work.
http://pascallaurin42.blogspot.com/2012/05/tfs-queries-searching-in-all-files-of.html
I must say this guy really has a good handle on utilizing linqpad to query tfs. What I am running into is when I run this I get the error stating that my version of tfs does not allow team branches…… I am really shooting in the dark on this one as I am no tfs expert, but this would be amazing if I could get this to work for tfs2008. Anyways any help or ideas on this is greatly appreciated….Thanks.
The versionControl.QueryRootBranchObjects() method isn’t supported against a TFS 2008 server because TFS 2008 doesn’t understand the concept of a “first-class” branch which was introduced in TFS 2010. However, you could still accomplish this by supplying your own list of branches.
For instance, if you replace lines 11-25 in the sample above with this code, it should work:
Obviously, you will want to replace $/project/main and $/project/dev with the branches you would like to search.
Let me know if you have any questions.
EDIT
Because you are using TFS 2008 you will also need to tweak a few other lines. Instead of including
Just include
And instead of this line:
Try this