Visual Studio Doesn't Create Solution

31 Views Asked by At

I keep running into this weird problem with Visual Studio. On numerous occasions I've made projects, but they don't make a Solution file.

In here I made a simple example where I make an Empty Project - it creates a solution file and I make a CMake Project and it doesn't. Now nowhere in the Create New Project do I deselect any "create solution file" option, but I don't understand why it doesn't generate one. And this applies to other projects I've made over time.

As soon as I create the project to include anything, or open a folder as a project, it doesn't generate any solution file.

And this applies to multiple version, I remember having this confusion when using VS 2019, and even now with 2022.

The problem is that I need the solution file (or more precisely, to modify its properties) for some functionality / setup that I need.

Is there a way to create or find this solution file if it's unavailable when I make or open a project?

enter image description here

When I switch views I get this:

enter image description here

1

There are 1 best solutions below

0
Zoltan Torok On

I believe the best way of solving this is:

File > New > Project From Existing Code. See here

and select the folder in which the code is.

When returning to Folder View, a .sln file is generated, but the hierarchy of the solution is more weird, because it includes all the library files in sources and headers. The solution properties is still empty, but the .sln works. I'll get more details on how much this worked when I fix the build error which prompted me to see what solution files can help though.