Export (0) Print
Expand All

How to: Create Solutions and Projects 

At the time you create a project, Visual Studio creates a solution to contain it. If you plan to create a multi-project solution, see How to: Create Multi-Project Solutions. If you want to create a project from existing code files, see How to: Create a Project from Existing Code Files.

NoteNote

If your anti-virus software displays an alert offering to block script that the project template or wizard is running, choose not to block script; otherwise, Visual Studio shuts down. You can prevent this alert from showing when script is run by clearing the anti-virus software's setting for blocking script; however, changing this setting disables all script blocking, not just for Visual Studio.

NoteNote

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

Creating Solutions

To create a new solution

  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.

  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 or repository.

  7. Click OK.

After creating an empty solution, you can add new or existing projects and items to the empty solution by using the Add New Item or Add Existing Item command from the Project menu.

Creating Projects

You can also choose to simultaneously create a new project and a solution to contain it.

To create a new project and a solution to contain it

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

  2. In the New Project dialog box, select one of the Project types from the left pane.

  3. Select one of the project Templates from the right pane.

  4. Enter a Name for the new project.

    NoteNote

    For some project types, the Name box 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 a save Location.

    NoteNote

    The Location box may be unavailable because you have enabled temporary projects in your Visual Studio settings. This allows you to create temporary projects that you can save to disk later or discard. If you are creating a temporary project, click OK now. For more information, see Temporary Projects.

  6. Select Create directory for solution.

    NoteNote

    This option is not available for directory-based projects. For more information, see Item Management in Projects.

  7. Type a Name for the solution that differs from the project name.

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

  9. Click OK.

    NoteTip

    You can also use this dialog box to add a new project to an open solution by selecting Add to Solution in the Solution list. This option appears only when a solution is open in Solution Explorer.

Click ? in the New Project dialog box for more information about specific project templates.

Deleting Solutions

You can delete an entire solution permanently, but not by using Visual Studio. Before you delete a solution, move any projects that you might want to use again in another solution. Then, instead, use Windows Explorer to delete the directory that contains the two solution files: .sln and .suo.

NoteNote

The .suo file is a hidden file that is not displayed with the default Windows Explorer settings.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft