views:

744

answers:

3

We have a Visual Studio 2008 solution under VSS source control. The solution contains many class libraries, many of which need a reference to an assembly that is not part of the solution. Currently we are keeping separate copies of that assembly in each project but as the number of projects grows it gets increasingly tedious to copy in updates to the external assembly. Is there a better way to have a single copy of the assembly in the solution, and in source control, that can then be referenced in all the projects?

A: 

There, here's VSS in its full "glory" with the whole "part of the solution".

Back to topic: not particularly sure, but first add lib folder to your directory structure, add it to source control, and then try adding a Solution Folder to your solution, where you'll do "Add Existing Item" for each third-party assembly.

Anton Gogolev
+3  A: 

Create an "external libraries"/"lib"/"libraries" folder in root folder, add it to source control and reference libraries in projects from there. With "Copy local" in reference properties project will automatically copy it to it's bin folder.

Structure of our project:

workspace
  config
    partial app configs goes here
  lib
    external libraries goes here
  src
    Domain          
      domainProjects
    Infrastructure
      infrastructureProjects
        references 3rd party dll's from lib folder
    UI
    Tests        
  solutions
    primaryUIapplication
      references projects from "src" folder
    domainLogic
    etc.

In solution it looks like:

_misc
  config
  tests
Domain
Infrastructure
UI
Arnis L.
A: 

Arnis L. has the answer - but I'm wondering why so many of your projects have the same dependency? If you restructured your projects so that only one of them had this dependency it would be easier to manage.

Jim Arnold