Include a Visual Studio solution into another VS solution?

Micha Vosse 26 Reputation points


I have the following setting:

  • VS Solution Core.sln
    • Core Project 0
    • Core Project 1
    • etc.
  • VS Solution Customer 0.sln
    • Customer Project 0
    • Cusotmer Project 1
    • etc.
  • VS Solution Customer 1.sln
      • Customer Project 2
    • Customer Project 3
    • etc.

Now I want that every customer solution has access to every project in the core solution. The core project is included into customer solutions as a git submodule, so a specific customer looks like this:

  • VS Solution Customer 0.sln
    • Customer Project 0
    • Customer Project 1
    • Core/
      • VS Solution Core.sln
        • Core Project 0
        • Core Project 1

Currently I add each Core project manually as "add existing project" into customer solutions.

Is there a way to link the customer solution with the core solution? So that everytime the core gets a new/ updated project, this project is automatically available in all customer solutions?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,690 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Yoann Blossier 0 Reputation points

    Hi, Your need is understandable but nor realizable because solution can't be include in another solution BUT you have solutions :

    1. Include the CORE projects in any solutions need them (maybe in a solution folder to organize tree)
    2. Reference your CORE libraries instead projects. At the end the results will be the code is used in your projects

    Ask if you need illustrations ;-)

  2. Anna Xiu-MSFT 26,566 Reputation points Microsoft Vendor

    Hi @Micha Vosse

    Welcome to Microsoft Q&A! 

    Which version of Visual Studio are you using? 

    You can refer to the blog: Walkthrough: Adding an existing Visual Studio solution to another solution

    If you are unable to change the file type to “Solution (*.sln)”, please try to directly type “*.sln” in File name and the solution will appear. 



    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

  3. Johan Andersson 0 Reputation points
    0 comments No comments