Is there any way to create a blank solution (.sln) file first and then add projects?

Allen Rice picture Allen Rice · Jul 27, 2010 · Viewed 50.4k times · Source

Visual studio has always annoyed me because (to my knowledge) you cannot create a solution first and then add new/existing projects to it. The only way I know how to create a solution is to create a project and specify the solution name for it.

So, is there any way to start with a blank solution (.sln) in visual studio (any version)?

Answer

Justin Ethier picture Justin Ethier · Jul 27, 2010

Yes, How to: Create Solutions and Projects gives an overview.

From the article:

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.