azure-devops-dotnet-samples icon indicating copy to clipboard operation
azure-devops-dotnet-samples copied to clipboard

Has the ability to create a TFS Branch been removed?

Open chambersDon opened this issue 6 years ago • 3 comments

I can't seem to figure out how to create a new TFS branch with the TeamFoundation libraries. These samples show how to do it with the git but not TFS.

Microsoft.TeamFoundationServer.ExtendedClient version 14.83.0 has VersionControlServer.CreateBranch and you get the VersionControlServer from the TfsTeamProjectCollection. These are gone in the current 16.143.2 version. In fact, they seem to be gone as early as 14.83.1. Strange that it's removed in such a minor version and it's not in the release notes.

Can I programmatically create a branch?

chambersDon avatar Aug 07 '19 20:08 chambersDon

I think they just moved it to another assembly. It's in the DLL Microsoft.TeamFoundation.VersionControl.Client for the nuget package version 15.131.1.

riQQ avatar Aug 09 '19 12:08 riQQ

@chambersDon my team did pretty in depth research about the branch creation of a TFS branch and we were unable to do so.

There might be a possibility loading that DLL in a powershell script and running that but that still uses the CreateBranch method in the older DLL.

hibroseph avatar Aug 12 '19 15:08 hibroseph

Microsoft removed this option in the new Rest API model :/ You can do it only with the old dll.

shayki5 avatar Sep 05 '19 14:09 shayki5