Did you know… You can add a solution to a solution – #153

Today’s tip falls into the "you can do… what!?" category. 

  1. Open your primary solution (the solution you want to add another solution to)
  2. Go to File – Add – Add Existing Project
  3. Change “Files of type” to Solution Files
  4. Select the sln file you wish to add

Add Solutions To Solutions in Add Existing Project Dialog

results in adding ClassLibrary1 to the ConsoleApplication4 solution, as shown below.


Technorati Tags: VS2005Tip,VS2008Tip

Comments (7)

  1. Patrik says:

    Cool! It’s such a simple thing but I’ve NEVER noticed that before. Since I subscribed to your blog, I’ve actually started to use Visual Studio more efficiently. So from me to you, a big THANKS.

  2. John Garland says:

    At the risk of being overly specific, it is worth noting that this technique imports the project  references from one solution into another – it is not a way to nest solutions within each other.

    Should the contents of the child solution be updated, it will be necessary to remove all of the imported projects from the parent solution before performing the import operation a second time.

  3. Peter N Roth says:

    I find that two solutions (at least) is almost always desirable.

    When building solution A, I use a companion called XA that contains the tests and drivers to exercise the code in A.

    Keep up the good work, Sara!

  4. Peter says:

    How to add solution which have same project names as the target solution?

    What are the reasons that you want to add a solution to another solution? If the solutions should be together, should they be in the same solution right at the start?

    What are the advantages and disadvantages using multiple solutions? One disadvantage that I have encountered is that I cannot find all references since the feature Find All Reference only search thru the current solution.

  5. Matt Casto says:

    I created a new blank solution and added an existing solution to it, but it couldn’t add any of the general solution items.  Probably just a side effect, but worth noting.

Skip to main content