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

  • SEARCH
  • Home
  • 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 698461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:16:40+00:00 2026-05-14T03:16:40+00:00

I was hoping that I could pass a DateVersionSpec into VersionControlServer.DownloadFile() but it doesn’t

  • 0

I was hoping that I could pass a DateVersionSpec into VersionControlServer.DownloadFile() but it doesn’t work. It tells me that the item doesn’t exist at that version, even though the file existed in source on the date passed.

Do I need to query the Item history just so I can figure out what version the file was at on the date in question? Use QueryHistory(...) method?

My current code:

version = new DateVersionSpec(date);
var changeSets = this.vcServer.QueryHistory(remoteFile, VersionSpec.Latest, 0,      
    RecursionType.None, user, version, version, 50, true, false);
if (changeSets == null) 
{
throw new Exception("Failed to find..."); 
}

foreach (var item in changeSets)
 {

 }

Currently I’m not getting anything back when I pull the changeSets enumerable.

I’m using code that’s a lot like this: http://blogs.microsoft.co.il/blogs/srlteam/archive/2009/06/14/how-to-get-a-file-history-in-tfs-source-control-using-code.aspx

Update: the code that I have is pretty close (practically identical to the code from the post) but it dies if the file was added on a date before the date passed in and hasn’t been changed since i.e. it only has one change and that’s an add.

  • 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-14T03:16:40+00:00Added an answer on May 14, 2026 at 3:16 am

    This got me what I was looking for on my app. If it doesn’t work check to make sure your file path is correct. That’s what I had wrong the first time around.

    this.vcServer.GetItem(remoteFile, new DateVersionSpec(date));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was just hoping that someone could point me to a reference that defines
I was hoping someone could validate my assumptions before I recommend that my client
I'm hoping that it isn't to pass each as a parameter to the controller
I'm hoping that i'm simply missing something, but I really can't see how to
I've run into a rather sticky situation and I was hoping you all could
Hoping that anybody here knows about a good one: I'm looking for a (free
Hoping that using something like this demo it is possible to drag items within
I'm hoping that someone has found a way of doing this already or that
I am hoping that this will have a pretty quick and simple answer. I
I am hoping that there might be an easy way to do this, 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.