We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

Multi-Project Solutions

A solution can contain multiple projects that you can open, close, and save together. Each project in a solution can contain multiple files or items. The types of items contained within a project vary according to the development language used to create them. Visual Studio provides Solution Folders to organize related projects into groups and then perform actions on those groups of projects.

The logical relationship between a solution and its components does not necessarily mirror the way the solution and its components are stored on disk. If you create an application consisting of multiple projects, you might consider creating a solution directory in storage to contain your local (non-Web) projects, solution files (.sln and .suo), and any shared solution items.

Your Projects in Solution Explorer and Windows Explorer

Solution Explorer Directory Structure

When you create a multi-project solution, the first project created becomes the startup project, by default. The startup project appears in bold font in Solution Explorer and is the project that runs when you click Start on the Debug menu. You can also start debugging all projects in a solution simultaneously or debug one or multiple projects in the solution by selecting the solution as startup project. For more information, see Startup Project, Common Properties, Solution Property Pages Dialog Box.

When you create a multi-project solution, you can build either a single project within the solution or multiple projects in the solution. You can also specify which solution projects you wish to exclude from builds. For more information, see Building in Visual Studio.

When you build an entire solution, projects are built in the order they were added to the solution. Dependent projects are built after the projects on which they depend. For more information, see How to: Create and Remove Project Dependencies.