Why?
I expect only the project to open.
The only way that I could accomplish what I wanted to do was to create a new project test.csproj, add design.csproj, save the solution, and then remove test.csproj.
CSPROJ files are are meant to be opened and edited in Microsoft Visual Studio (Windows, Mac) as part of Visual Studio projects.
Then, right-click on the project and choose Edit <projectname>. You don't have to use solutions or projects in Visual Studio to edit, build, and debug code. You can simply open the folder that contains your source files in Visual Studio and start editing.
Double-click a solution file (. sln) in Windows Explorer to open it.
Open Visual Studio, and on the start window, select Create a new project. On the Create a new project page, type blank solution into the search box, select the Blank Solution template, and then select Next.
In Tools > Options > Projects and Solutions > General
, there is a checkbox, labeled "Always show solution
".
With this option checked, opening a project from within the folder stucture of a solution will still open the whole solution. If you click only the project, I believe the IDE finds the solution by simply traversing the parent directories for the .sln
file.
The reason I say that is because if you copy the directory containing a single project and paste it somewhere else, then double click it, the project is opened on its own (still inside a solution, but a temporary one, which only exists as an .suo
file for now (until you save the solution.))
So we are halfway there. Now if you uncheck the option which I mentioned at the start of my post, you will see the project open on its own like so:
I agree that it should be possible to open a project without a solution (and that it should be easier than it is currently.) I'd go as far as to say that VS should also give you the option to easily make and run programs in a single file without all the hand-holding and creating projects and solutions for you. Perhaps you can, but if so - it's not obvious.
Maybe because you have "Open most recent solution" in Options?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With