We recommend using Visual Studio 2017

Creating Multi-Project Solutions

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 Visual Studio Projects node of the New Project dialog.

Thus, the framework for the physical association of your solution's files is established during the creation of a file or project.

The benefits of an orderly file structure that accurately reflects the relationships between their files and projects are readily apparent, 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 bearing their names. For more information, see Creating Directories for Solutions and Item Management in Projects.

Tip   You can more easily share numerous and related source-controlled projects by creating them under a common solution directory.

To create a root solution directory for multiple local projects

  1. On the File menu, choose New and then choose Project.
  2. In the New Project dialog box, select a Project Type from the left pane.
  3. Select a project Template from the right pane.
  4. Type a project Name.
    Note   For some project types, the Name textbox is unavailable because specifying the location sets the project name. For example, Web applications and XML Web services are located on a Web server and derive their name from the virtual directory specified on that server.
  5. Select Close Solution (if one is already open).
  6. Choose More.

    If Less but not More is available, ignore this step.

  7. Select Create directory for Solution.
  8. In New Solution Name, give your solution a unique name (usually different from the project Name).
    Tip   When you create multi-project solutions containing Web projects, establish a Solution directory by first creating a Blank Solution and subsequently adding projects to it.

To create a solution for multiple Web and/or local projects

  1. On the File menu, choose New and then choose Project.
  2. In the New Project dialog box, select Visual Studio Solutions from the left pane.
  3. Select the Blank Solution template from the right pane.
  4. In the Name textbox, type a name for the solution.

You have created a new solution and are now ready to begin adding projects.

To add a project to a solution

  1. On the File menu, choose Add and then New Project.
  2. Select a Project Type and Template.

See Also

Creating Directories for Solutions | Creating New Solutions and Projects | New Project Dialog Box | Add New Project Dialog Box

Show: