Dela via


How to: Create Directories for Solutions

By default, solution level files such as .sln and .suo files are created in the same physical directory folder as the first project that is created with the solution. Creating a directory structure similar to the logical structure shown in Solution Explorer makes project and solution files easier to locate and facilitates the task of sharing an entire solution with other developers on a team.

You can either specify a directory for the solution by creating just a blank solution or you can specify the directory when you create a new project.

Note

The options available in dialog boxes, and the names and locations of menu commands you see, might differ from what is described in Help depending on your active settings or edition. This Help page was written with the General Development settings in mind. To view or change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

To create a solution directory

  1. On the File menu, select New and then click Project.

  2. In the Project types pane, select Other Project Types and then select Visual Studio Solutions.

  3. In the Templates pane, select Blank Solution.

  4. Enter a name for the project.

    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. To change the location of the solution directory, choose Browse and specify a new location.

  6. Select Add to Source Control if you want to add the solution to a source control database.

You can specify a solution directory while creating a project.

To create a solution directory while creating a project

  1. On the File menu, select New and then click Project.

  2. Select a template for the project you want to create.

  3. Enter a name for the project.

    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.

  4. Select the Create directory for Solutioncheck box.

  5. In the Nametextbox for the solution, type a name for the solution.

  6. To change the location of the solution and project directories, choose Browse and specify a new location.

  7. Select Add to Source Control if you want to add the solution to a source control database.

For more information, see Creating Multi-Project Solutions.

See Also

Tasks

How to: Create Multi-Project Solutions

Concepts

Item Management in Projects

Solutions as Containers

Reference

New Project Dialog Box