Partager via


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.

AddSolutionsToSolutions2

Technorati Tags: VS2005Tip,VS2008Tip

Comments

  • Anonymous
    February 17, 2008
    PingBack from http://www.biosensorab.org/2008/02/18/did-you-know-you-can-add-a-solution-to-a-solution-153/

  • Anonymous
    February 18, 2008
    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.

  • Anonymous
    February 18, 2008
    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.

  • Anonymous
    February 18, 2008
    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!

  • Anonymous
    February 19, 2008
    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.

  • Anonymous
    March 05, 2008
    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.

  • Anonymous
    December 25, 2008
    本篇包括tip151-tip160http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-16.html#151、意外...