среда, 24 августа 2011 г.

How to convert TFS folder to branch programmatically by TFS API (Convert to Branch operation in VS2010))


How to convert TFS folder to branch programmatically by TFS API (Convert to Branch operation in VS2010))

First you need create instance of VersionControlServer object. Then use CreateBranchObject method. serverTrunkPath="C:\myWorkspace\trunk" - target folder you want to make branch.

versionControlServer.CreateBranchObject(new BranchProperties(new ItemIdentifier(serverTrunkPath)));