Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8543507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:19:06+00:00 2026-06-11T12:19:06+00:00

I installed linqpad a while ago and recently I came across some articles on

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T12:19:08+00:00Added an answer on June 11, 2026 at 12:19 pm

    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:

    var teamBranches = new String[] { "$/project/Main", "$/project/Dev" };
    
    filePatterns.Dump("File patterns");  
    textPatterns.Dump("Text patterns");    
    
    foreach (var teamBranch in teamBranches)   
        foreach (var filePattern in filePatterns)    
            foreach (var item in versionControl.GetItems(teamBranch + "/"     + filePattern, RecursionType.Full).Items)     
    
    SearchInFile(item); 
    

    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

    Microsoft.TeamFoundation.Framework.Client
    

    Just include

    Microsoft.TeamFoundation.Client
    

    And instead of this line:

    var tfs = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri("http://localhost:8088/tfs")); 
    

    Try this

    // Note, 2008 servers don't use "/tfs" and I can't remember if they take a Uri
    // or a string.
    var tfs = new TeamFoundationServer("http://localhost:8080");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I installed new wordpress . and made some changes in twentyten theme.. only color
Installed a captcha on my blog, been good up until now. There have recently
I installed the VTK toolkit and I use the Java wrapper for VTK in
I installed Python 2.7 on my mac from source. Before, I could use the
I installed the grails currency plugin. I want to use the Money type in
I installed the RSE plugin in Eclipse intending to either use SSH or FTP
I installed Redcar editor in my Ubuntu 10.10, but I have some problems with
I installed some Perl modules in my Linux machine. If I enter perldoc perllocal
Installed Git and created heroku account for use with a facebook app unable to
I installed PyPy while still having Python 2.7 on my system. How do I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.