The new project dialog window in Visual Studio shows an additional “Solution” dropdown when you try to create a new project with an existing solution open. Yes, many of us may overlook this feature, but now you give it a try. When we create a new project in Visual Studio, the new dialog window asks for Name, Location and Solution Name. But, If you open the new project dialog when you have an existing solution already open, you will find an additional drop-down “Solution”.
Start a new instance of Visual Studio and launch the new project dialog window from the File > New Project. Select the type of project, and you need to provide Name, Location and Solution Name to create your project.
Once you click on Ok, Visual Studio creates the new solution.
Solution drop-down in New Project Dialog
Now, keeping that solution open, again try to create a new project from File > New Project. This time you will have the different option – like said, one additional “Solution” option
Related Tip: Did you know – You can automatically create classes from JSON or XML in Visual Studio?
The Solution drop-down has following three different option
- Create new Solution
- Add to Solution
- Create in a new instance
By default, “Create new Solution” is selected. If you go ahead with this option, Visual Studio will close the existing solution and create the new solution based on the current project types and inputs provided.
When we select, “Create in new instance”, Visual Studio will keep your current solution intact and it will instantiate another new instance of Visual Studio with current project type selected.
In case “Add to Solution” option, it will work as adding a new project to the existing solution. Here, the solution name textbox will be disabled, and a new project will be added to an existing solution. This works as similar to Add > New Project from the Solution Explorer
Related Post: Did you know– You can Drag-Drop & Copy-Paste code inside Watch Window in Visual Studio?
Most of the time we close the existing solution before we create a new project, and we overlook this option. Hope you will now explore and utilize this option.
Hope this helps!