Programatically checkout a file in TFS 2010
I have a program which create a new branch when I give it the required arguments.
After creating the new branch, I would like to check-out a project file, add some post-build events, and then check it in again.
开发者_运维技巧How can I do that?
You need to use the workspace method, PendEdit(string Path) http://msdn.microsoft.com/en-us/library/bb139369.aspx
So you could do this,
GetStatus status = workspace.Get(new GetRequest("FilePath", RecursionType.None, VersionSpec.Latest),GetOptions.Overwrite);
workspace.PendEdit("FilePath");
HTH Cheers, Tarun
精彩评论