How to link multiple visual studio solutions together?

This question has popped up in different, but related, forms. There is actually an MSDN page that covers this.

What you're looking for is a multi-solution approach akin to the Partitioned Single Solution Model for Larger Systems. Have one "everything" solution that builds everything and maintains your inter-component dependencies. This is what you build when you need to build solution A. You then have separate solutions that only include components B or C. Essentially, you'll still have 3 solutions, but you'll add the projects from solutions B and C into solution A.


I have recently discovered that in Visual Studio 2008 you can include existing projects in multiple solutions. The only downside so far seems to be that if you make a change to a shared project and have multiple solutions open that use that shared project you will be asked to "reload" the other solutions.

So, just "Add Existing Project" to all the solutions that need the project. I am using TFS on my current site and there seems to be no issues with source control ether.


It should be project level you are looking at I believe. Build the projects contained within Solution B and C and then add references to the DLLs in the relevant projects in Solution A.

In Msbuild if you have a property group

<PropertyGroup>

<SolutionsToBuild>SolutionB</SolutionsToBuild>
<SolutionsToBuild>SolutionC</SolutionsToBuild>
<SolutionsToBuild>SolutionA</SolutionsToBuild>
</PropertyGroup>

Then execute the MSBuild Task

<MSBuild Projects="@(SolutionsToBuild)"/>

Hope this helps