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."
You can use the
QueryHistorymethod for these sorts of questions: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.