I've been following the advice in "Team Development with Visual Studio Team Foundation Server" on structuring projects and sharing code from one team project into another using branching. So our source tree looks like this:
server\instance
Shared
share
Project1
Main
Product1
share (branched into Project1 from Shared)
Stories
1607
1832
Or at least it should.
As you can see, as well as branching in some shared code, we also use branch per user-story.
The problem is, when I try to branch in the share folder from the Shared project (Source Branch Name: $/Shared/share; Target Branch Name: $/Project1/Main/share), I get the error:
TF203028: You cannot create a branch at $/Project1/Main/share because a branch already exists at $/Project1/Main.
It is documented that you cannot nest branches in TFS, so the error is not surprising. Thus it appears that I am scuppered and the Team Development book is wrong. (The book implies that this should work.)
But appearances can be deceptive and I'm more likely to be wrong than the authors of the book. Can anyone help me understand how to fix this?
(One obvious solution would be to make the root of the story branches a sibling of share, rather than a parent. But this won't be any use to us, because it would mean that we would be unable to make changes to the shared code in a story branch, which rather defeats the object of branch per story. It would also mean a fairly colossal amount of work changing paths in the projects.)