yosbel
yosbel

Reputation: 1831

Branching project with branches of other projects int TFS 2013

I have in my TFS collection 4 projects:

My External Project is where I store external libraries, not developed int he company. My Internal Project is where I store internal libraries, developed in the company. Project A and Project B are projects developed in the company.

Internal Project has dependencies on some libraries of External Projects. Project A and Project B has dependencies on some libraries of Internal and External Projects.

I want that Internal Project has dependency on the libraries of External that it uses. To make that work I branch those projects into Internal Project, like follows:

Internal Project

External Project

Project A

Project B has similar structure to Project A. I want that once Internal Project has settled the references to External, when I set Project A references to Internal, automatically it references all the libraries in external also. I manage to make the references of External to Internal Project by branching the libraries I want to reference in the specific version I needed. This works fine, but when I try to branch all the Internal Project into Project A or Project B, TFS does not let me do it, because of the internal branches contained in Internal from External.

I'm newbie to TFS, and this structure was created when the company was using IBM Rational ClearCase. Probably this is not the correct way to organize my projects, or perhaps branching is not the way to make the references I want. If someone could help to make it work, thanks.

Upvotes: 2

Views: 246

Answers (1)

Dylan Smith
Dylan Smith

Reputation: 22235

The better way to do this is to use binary dependencies. Don't take a dependency on the source, but instead of the compiled binary. You would check the various binaries (from External/Internal) that Project A needed into a lib folder into Project A, and setup your references to point to that path.

This way it gives Project A developers the flexibility to determine when they wish to update the version that they depend on (by checking in an updated binary).

An even better way is to have the External/Internal libraries publish their binaries via NuGet, and have Project A/B use NuGet to manage their dependencies.

Upvotes: 2

Related Questions