We are working with Team Foundation Server (Visual Studio 2010).
How can I get writer of the specific code block programmatically?
We are working with Team Foundation Server (Visual Studio 2010).
How can I get writer of the specific code block programmatically?
MSDN has Annotate option for the tracking of such information, but the default is on file-level and check-in operations. For such info, we usually use code comments, it may be not so professional but it is good.
With TFS API, you may be able to get to that data. Each changeset has a commiter. I would take the code offered up here. From this, you can add:
While this doesn't get you 100% of the way there, it is at least a starting point.
Fairly simple.
I have a working demo on my blog => http://geekswithblogs.net/TarunArora/archive/2011/06/26/tfs-2010-sdk-smart-merge-programmatically-create-your-own-merge.aspx
Edited
I am very sorry i misunderstood your question. What you are looking for is to be able to get a changesetId based on a specific file path in TFS and then being able to see the modified items for that changeset and then being able to see the modification in the source code and know who the author of that source change is. Right?
If that's correct, can you not do the following,
Does this help, can i provide additional details?
HTH.
Cheers, Tarun