When starting a new project with multiple projects in the solution, it might be best to first start with the completely empty solution and then add new or existing projects to that blank solution. We are going to do just that using Visual Studio 2022.
First, we launch Visual Studio and select "Create new project" from the starting window as shown below:
Step 1 - Create blank/empty solution
In the "Create a new project" window, you will see the list of available templates on the right side.
We can find the blank or empty solution in several ways. One way is to click on the 3rd drop-down menu that has "All project types" selected and choose "Other" from the list of project types.
Another way is to search for either the "solution" or "blank" keyword in the search box. The "Blank Solution" template will be the only template listed.
Select the template and click the "Next" button to go to the next step.
Step 2 - Configure your project
In this step we need to configure the project we selected, in our case, it's just a blank solution so we only need to set:
- Solution name
- Location of the solution
Next, we click the "Create" button to create the blank solution.
In the location path that we provided, the folder with the solution name will be created. Inside the folder, we will find a solution
.sol file and a
.vs hidden folder. The hidden folder will contain a
.suo file that is used by Visual Studio to store user preference settings.
What to do with the empty solution
The Visual Studio should now fully load with Solution Explorer containing the empty solution.
By right-clicking on it, we can now add existing or add new projects as shown below:
If we choose to add a new project, the same window that lists all the templates will be shown again and we can add the project template we want.
Problem with missing template
When adding a new project to the solution, if the project template is not in the list of available templates, it usually means that the needed workload is not installed. At the bottom of the list of available templates, click on the "install more tools and features" link to open the Visual Studio Installer and install the missing workload.
The blank solution project type is the only template that doesn't need any workload, so it should be always available even if no workloads were installed.
In this article, we learned how to create a new blank solution in Visual Studio. After we create it, we need to configure it by giving the solution a name and path location. After that, the Visual Studio with empty solution loads from which we can then add new or existing projects.