Search code examples
visual-studio-2008visual-sourcesafe

TFS Shared Libraries


We are currently migrating to TFS from VSS and I wanted to know what options there are for shared libraries i.e. Visual Studio Projects which are used in several different Solutions. The best example I can give is our Data Access component which is used in most of our Visual Studio Projects.

Here are a couple of solution examples under VSS

Visual Studio Solution 1 - Employment

  • Data Access Project
  • Document Access Project
  • Employment Website Project
  • Employment Tools Project

Visual Studio Solution 2 - Legal

  • Data Access Project (same project as above, same disk location and source control)
  • Document Access Project (same project as above, same disk location and source control)
  • Legal Website Project
  • Legal Tools Project

Visual Studio Solution 3 - Pensions

  • Data Access Project(same project as above, same disk location and source control)
  • Document Access Project (same project as above, same disk location and source control)
  • Pensions Website Project
  • Pensions Tools Project

This all works fine under Sourcesafe. Using the above example under TFS I am going to 3 create separate Employment, Legal and Pensions TFS Projects (all on the same TFS Collection) that will then contain the above solutions.

Reading around the web I have concluded that I need to create a 4th Share Libraries Solution, add the Shared Visual Studio Library Projects (e.g. Data Access Project, Document Access Project) to this new solution and put that into a new 4th TFS Project called Shared Libraries. Then I have two options

1) Remove the Shared Projects from the other Solutions/TFS Projects and then just reference the built assemblies instead.

2) Branch the Shared Projects within each of the TFS projects to allow developers to keep the Shared Projects in their solutions.

Does the above steps and two different options seem correct to you? Have I missed any other options for shared libraries? I am a little reluctant to go down the branching route as it is not something I have done before, but I will read up on it if it is the best option.


Solution

  • The basic idea is to reference the binaries.

    However, if a particular project needs to make changes to the shared libraries independent of the others, then branching is a good thing. You would just branch the Shared Libraries solution, though - you wouldn't "branch it into" other solutions like you would in VSS.