Visual Studio allows us to create a blank solution when creating a new project. But it seems that for some users, the blank solution is missing from the list of templates. In this tutorial, we are going to learn two different solutions to this problem. First, we will manually create a .sln
solution file, and in the other solution, we will install a component using Visual Studio Installer.
Missing project templates
When any project template is not in the list of available templates in Visual Studio, it usually means that some required workload is not installed. At the bottom of the list of available templates, we can click on the "install more tools and features" link to open the Visual Studio Installer and install the missing workload.
However, this is not the case with the blank solution template.
The blank solution project type is the only template that doesn't need any workload, so it should always be available in Visual Studio even if no workloads were installed. Still, it appears that sometimes the problem of a missing blank solution does happen.
Since the solution template only creates a single .sln
file and is text-based with only about 10 lines, it's pretty easy to create a solution template manually.
Solution 1 - Creating solution template manually
When we create an empty solution in Visual Studio 17.3.5, the .sln
file will have the following content:
We need to make two changes to the code above:
-
Line 3 - VisualStudioVersion
The first few lines of
.sln
file provide information on the version of Visual Studio. The VisualStudioVersion definition contains the build version of Visual Studio that created the solution.Note that the build version is not the same as the Visual Studio release version. Check the Visual Studio build numbers and release date page for the correct build number.
-
Line 10 - SolutionGuid
In line 10, we have SolutionGuid which contains a unique GUID. Every new blank solution contains a different GUID, so we can use an online GUID generator to create a GUID value for the SolutionGuid={} definition.
After saving those changes, If we double click on the solution file, the Visual Studio should open with the empty solution in Solution Explorer.
.
Solution 2 - installing or reinstalling a component
One solution that I have seen mentioned on the web is to try to install the ".NET Framework project and item templates" component. I haven't encountered the problem of missing a blank solution myself, but a commentator confirmed that this works.
If the .NET Framework project and item templates component is already installed, then try to uninstall and then reinstall the component.
Check Installing ASP.NET .NET Framework article on how to install this component.
I would like to thank Drew commentator for the confirmation of this solution.
Conclusion
Sometimes, the blank solution is missing in Visual Studio when creating a new project template. In this article, we learned how to create a new blank solution manually and we also mentioned another solution which involves installing the ".NET Framework project and item templates" component.
Drew
November 1, 2022In my situation I already had the '.NET Framework project and item template' component installed and was still missing the Blank Solution option. I uninstalled and reinstalled the component and it appeared. So yes, I can confirm it does work. Thank you!
Seong-jin Yun
November 25, 2022Uninstalling and reinstalling .NET Framework project and item templates solved the problem. Confirmed!
David Maltby
January 11, 2023I had this issue. The component wasn't installed when I opened the Visual Studio installer. Installed it fixed the issue. Thank you!