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 874109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:03:13+00:00 2026-05-15T11:03:13+00:00

I’m working on a TFS utility that gets the changesets for a particular project

  • 0

I’m working on a TFS utility that gets the changesets for a particular project in TFS. I’ve got a home TFS 2010 server which I primarily use for testing, but I decided to give it a try against a codeplex project to which I contribute. That way, I can test functionality against a larger number of changesets than I have locally.

While it works fine in my environment, heading out over the wire to codeplex has left me stumped. My application queries the history, but then, when trying to iterate through the history (which is when it lazy-loads the IEnumerable), my application hangs.

Looking at Intellitrace, I see a couple of “first chance” exceptions that the “item doesn’t exist at the specified version”– which is patently not true, as I’m trying to get history for “$/” at VersionSpec.Latest.

I also see two or three consecutive server 500 errors being returned to me after forcing debugging to pause.

Other operations (like GetItems() ) work fine, so I’m pretty sure authentication isn’t an issue.

Any thoughts?

Here’s the code:

IEnumerable items = vcs.QueryHistory("$/", VersionSpec.Latest, 1, RecursionType.None, null, null, null, 5, true, false);

        List<ChangesetItem> returnList = new List<ChangesetItem>();
        foreach (Changeset cs in items)  //hangs here on first iteraiton
        {
            ChangesetItem newItem = new ChangesetItem()
            {
                ChangesetId = cs.ChangesetId,
                //ChangesetNote = cs.CheckinNote.Values[0].Value,
                Comment = cs.Comment,
                Committer = cs.Committer,
                CreationDate = cs.CreationDate
            };

            returnList.Add(newItem);
        }
  • 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-05-15T11:03:14+00:00Added an answer on May 15, 2026 at 11:03 am

    Doh! Found it. The problem was on my QueryHistory call:

    IEnumerable items = vcs.QueryHistory("$/", 
                      VersionSpec.Latest, 
                      1, // the deletionId should be '0' or a unique deletion identifier
                      RecursionType.None, 
                      null, 
                      null, 
                      null, 
                      5, 
                      true, 
                      false);
    

    I commented the line of code above. For some reason, I thought deletionId was supposed to be ‘1’, however, now that I’ve looked at the API, I realize that it is supposed to be a zero (for existing files), or the specific deletion Id for files that have been deleted. Apparently, the API was looking for a file with deletionId of ‘1’, which it couldn’t find, thus causing the crash.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

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.