What is the purpose of *.sln und *.suo files and why arey outside the project folder ?

M

Mark Poppers

I found a *.sln and an *.suo file which belong to my current project because the have the same name
"TestDatabase33....." as my project.

What is the purpose of these files ?

If I delete them accidentially: Are they re-created automatically ?

Why are they currently not in the project folder (where the *.csproj file is) but in the parant folder ?

Can I simply move them to the project folder ?

Marl
 
A

Alberto Poblacion

Mark Poppers said:
I found a *.sln and an *.suo file which belong to my current project
because the have the same name
"TestDatabase33....." as my project.

They are the Solution files. You can group several projects under one
solution. If you just "create a new project", a solution is created with the
same name as the project, and the project is hosted inside that solution.
What is the purpose of these files ?

.sln basically contains the list of the projects that are contained in
the solution. That's why it is outside the project folder (or projects
folders, if there are several in the solution). .suo is "solution user
options", and contains your last configuration, such as what tabs you left
open the last time you worked on the project, so they open again when you
reload the project in Visual Studio.
If I delete them accidentially: Are they re-created automatically ?

If you delete .suo, it is recreated silently. If you delete .sln, you
will no longer be able to open the whole solution at once, but you can still
open the individual projects (.csproj) that were contained in the solution.
Why are they currently not in the project folder (where the *.csproj file
is) but in the parant folder ?

Because they can apply to several projects, not only to that one.
Can I simply move them to the project folder ?

You can move the solution file to the same folder as a project, but you
have to edit the file paths inside, or remove the project from the solution
and add it back to it.
 
J

Jon Davis

Alberto Poblacion said:
.suo is "solution user options", and contains your last configuration,
such as what tabs you left open the last time you worked on the project,
so they open again when you reload the project in Visual Studio.

It also contains all your breakpoints. Handy tip: Delete this file if Visual
Studio has a problem with hanging for several seconds every time it enters
debug mode.

Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top