Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

How to: Create Multi-Project Solutions

Updated: July 2008

Any solution can contain one or more projects. Multi-project solutions are created by adding projects to existing solutions. For more information on creating solutions, see How to: Create Solutions and Projects.

Solutions are created under these circumstances:

  • A new file is added to an empty solution.

  • A project is added to an empty Solution Explorer.

  • A blank solution is added from the Other Project Types, Visual Studio Solutions node of the New Project dialog box.

The framework for the physical association of your solution's files is established when a file or project is created.

In a multi-project solution, an orderly file structure that accurately reflects the relationships between projects and their files is helpful throughout the development cycle, especially for larger projects. For all projects, you can establish a root solution directory where all local files are saved and all projects are, by default, created in folders that bear their names. For more information, see How to: Create Directories for Solutions and Item Management in Projects.

NoteNote:

You can more easily share many related source-controlled projects by creating them in a common solution directory.

You can add either a new project or an existing project to a solution.

To add a new project to a solution

  1. In Solution Explorer, select the solution or the solution folder that you want to add a project to.

  2. On the File menu, point to Add and then click New Project.

  3. Select a Project Type and Template.

You can add an existing project to a solution and then edit that project to meet the requirements of the current solution.

To add an existing project to a solution

  1. In Solution Explorer, select the solution or the solution folder that you want to add a project to.

  2. On the File menu, point to Add and then click Existing Project.

  3. Select the project you want to add to the solution.

NoteNote:

The Add/New Project and Add/Existing Project commands can also be accessed by right-clicking the solution in Solution Explorer.

You can delete an entire solution permanently, but not by using Visual Studio.  

To delete a solution permanently

  1. Before you delete the solution, move any projects that you might want to use again.

  2. Use Windows Explorer to delete the directory that contains the two solution files, .sln and .suo.

Date

History

Reason

July 2008

Replaced procedure for creating a solution with topic link. Added clarifying notes. Updated UI text.

Customer feedback.

Community Additions

ADD
Show:
© 2015 Microsoft