views:

443

answers:

4

Is it possible to make a solution in VS depend on (i.e. include) an entire other solution? I've seen some stuff about "Solution Folders", but these don't seem to be the same thing....? Thanks! (BTW, I'm using VS 2008)

+6  A: 

Not really. You'd have to do one of the following:

  • Make a build script that builds the solutions in the correct order.
  • Pre-build solution A, and only reference the built binary outputs from it in solution B.
  • Make a third solution containing all of the projects from both solutions.

The first two items are the most common, where I personally prefer the second.

280Z28
*sigh*... OK; thanks!
Robert Fraser
+1  A: 

A solution is a collection of assemblies that build to create some kind of executable or dll. Having one solution depend on another does not make sense. The output assembly (executable/dll) depends on the assemblies that it references. If your solution depends on other assemblies, then reference them. You can add projects to your solution (File>Add>Existing Project) and then you can add refences these projects from your output project.

darasd
+1  A: 

You cannot do that. And why would you want to?

Simply add all the projects that you depend on (the projects in the 'other' solution) to the solution.

Then use project references (not file references) between the projects.

codeape
I want to depend on another solution for which I don't have control. If that solution gets updated to include another project, I want that automatically taken into account.
Robert Fraser
In that case, either: Create a script that automatically generates your solution file. Or manually add projects to your solution, and create a script that validates that all projects are in the solution. Solution files are simple text files with a fairly simple structure.
codeape
A: 

You guys are not familiar with branches aren't you? Example: I have a solution with project A et B

My friend has his solution with a project C but need everything in my solution in order to debug or correct stuff in it

It could be a good thing to have his solution based on mine instead of including dll or bin or i don't know what

oim