Creating New Solutions and Projects

At the time you create a project, Visual Studio also creates a solution to contain it. If you plan to create a complex or multi-project solution, see Creating Multi-Project Solutions.

Note   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.

To create a new solution

  1. On the File menu, select New Blank Solution.
  2. In the New Project dialog box, enter a Name for the new solution.
  3. Select a save Location.

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

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 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. Enter a Name for the new 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. Select a save Location.

  6. Select More.

  7. Select Create directory for Solution.

    Note   This option is not available for Visual Basic Web or C# Web projects and other directory-based projects. For more information, see Item Management in Projects.

  8. Type a New Solution Name that differs from the project name.

  9. Select Open.

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

Choose Help in the New Project dialog box for more information about specific project templates.

See Also

Managing Solutions, Projects, and Files | Adding and Removing Solution Items | Using Solution Explorer | Creating Multi-Project Solutions | Adding Solutions and Projects to Source Control