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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:38:30+00:00 2026-06-16T04:38:30+00:00

I have a Visual Studio C# project in TFS that compiles into a DLL.

  • 0

I have a Visual Studio C# project in TFS that compiles into a DLL.
I need to know if any of the files inside the project has been modified in a period of time.
Something like this:

"from date 01/01/2011 to today,  check if the project has been modified."

What is the best approach to do this using the TFS API in C#?

My idea: Get all the project items from TFS, for each item check it’s change history. Filter the history according to the given range period. If there are changes in that period, then that file was modified, hence the project has been altered. Is this correct?

Could it be possible to do the same but not searching between a period of time, but in a range of changesets? For example:

"from changeset 1071 to latest,  check if the project has been modified."
  • 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-16T04:38:31+00:00Added an answer on June 16, 2026 at 4:38 am

    You can use the QueryHistory method for these sorts of questions:

    var tfs = new TfsTeamProjectCollection(new Uri(@"http://tfs.example.com:8080"));
    var vc = tfs.GetService<VersionControlServer>();
    
    // DateTime fro, to;
    var changesets = from cs in vc.QueryHistory(
        "$/YourProject",
        VersionSpec.Latest,
        0,    /* deletion ID, 0 otherwise */
        RecursionType.Full,
        null, /* user, null for all */
        null, /* from changeset, null because these aren't by date */
        null, /* to changeset, null because these aren't by date   */
        Int32.MaxValue, /* get them all */
        false, /* just metadata */
        false /* just the current stuff */
        )
        where cs.CreationDate >= fro && cs.CreationDate <= to
        select cs;
    

    Once you have the list of changesets, you could query them for the files they are associated with. At this point, if you really really wanted to exclude false positives, I would tack on Roslyn support for reading Projects and Solutions and use that to filter interesting file names.

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

Sidebar

Related Questions

Visual Studio 2012, TFS, Windows 7 We have a C# solution that has 4
I have a C# Visual Studio project (.csproj) that has a reference to the
I have a build-definition in TFS that builds a database-project in Visual Studio. The
I have this Visual Studio solution that includes a project that has a template
I have MS Visual Studio web project folder came from TFS server with several
I have a WCF visual studio project, which contains many SVC files. Can I
I have a Visual Studio Setup project which has a Application Folder DefaultLocation set
I have a project in visual studio 2010 bind to the TFS. Now we
Suppose you have a TFS collection with a Samples project that contain your Visual
I have a development database that re-deploy frequently from a Visual Studio Database project

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.