While experimenting with the TFS 2013 API, I ran into the following issue which I can't seem to resolve when programmatically creating a new branch like this:
//var workspace = connect-to-tfs-server-and-locate-workspace
workspace.PendBranch(scmSourcePath, scmTargetPath, VersionSpec.Latest);
changes = workspace.GetPendingChanges();
workspace.CheckIn(changes, "I just create a branch");
or even via,
workspace.CreateBranch(scmSourcePath, scmTargetPath);
The branch is created just fine, however the new icon featured here http://msdn.microsoft.com/en-us/library/ms181425.aspx is not displayed (notice the alternative icon in the image at FeatureTeamA). Instead the 'uninformative' folder icon is shown.
If i create the same branch using the Source Control Explorer it does show the new 'branch icon'. Anybody any ideas what I'm missing?
You need to convert the parent folder to
BrancObject
if it isn't one yet:See also: