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

Viewed 82149

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)?

7 Answers

For Visual Studio 2019 the steps are described in https://docs.microsoft.com/en-us/visualstudio/get-started/tutorial-projects-solutions?view=vs-2019#create-a-solution

  • Open Visual Studio.

  • On the start window, choose to Create a new project.

  • On the Create a new project page, enter blank solution into the search box, select the Blank Solution template, and then choose Next.

Note: You need to make sure you open a brand new project, right-clicking and create new project will not generate the option to create a blank solution.

enter image description here

If you are on VS2019, try this:

All Languages - All Platforms - Other

screenshot

I fixed the missing "blank solution" problem in VS 2022 with Visual Studio Installer. My installer is not in english, so labels might be a little bit different. Sorry for my french english ;-)

In "Installation details", "Web dev with ASP.Net", "Optional", 8th checkbox "Items and projects templates for .Net Framework" (I can't imagine how this is related to the blank solution template... But i worked for me)

For Visual Studio 2019 and 2022, I found this solution to work.

Warning!

  1. You will have to re-signIn and Launch Visual Studio several times if you see anything abnormal (like i did).
  2. And Update Visual Studio Installer to re-download .Net core and other version frameworks

Source of Solution :Visual Studio Dev Comminity

Launch Command line and browse to devenv.exe

C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe 

launch executable with following argument: /resetuserdata

or copy paste full command here.

C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe /resetuserdata
Related