Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I add the Visual Studio .suo and .user files to source control?

Visual Studio solutions contain two types of hidden user files. One is the solution .suo file which is a binary file. The other is the project .user file which is a text file. Exactly what data do these files contain?

I've also been wondering whether I should add these files to source control (Subversion in my case). If I don't add these files and another developer checks out the solution, will Visual Studio automatically create new user files?

like image 427
Ben Mills Avatar asked Sep 16 '08 13:09

Ben Mills


People also ask

What is .user file in Visual Studio?

suo file. The solution user options file is used to store user preference settings, and is created automatically when Visual Studio saves a solution.

Can I delete the .SUO file?

Basically the suo file(i.e., Solution User Options) contains the information related to to a user level customization like breakpoints, bookmarks, Outlining, debugger watches etc. Also note that if you delete the suo file then Visual Studio will create a new one.

Should I add .VS folder to Git?

No, you should not add it to source control. The purpose of this folder is to move machine- and user-specific files to a central location. The explanation on the Visual Studio User Voice issue explains it well: So far, we have moved the .

What are .user files?

User settings file created by Visual Studio, a software development tool used to develop Windows programs and Web applications; contains user preferences, such as debugging and deployment settings; used for saving and loading project preferences for a specific user.


1 Answers

These files contain user preference configurations that are in general specific to your machine, so it's better not to put it in SCM. Also, VS will change it almost every time you execute it, so it will always be marked by the SCM as 'changed'. I don't include either, I'm in a project using VS for 2 years and had no problems doing that. The only minor annoyance is that the debug parameters (execution path, deployment target, etc.) are stored in one of those files (don't know which), so if you have a standard for them you won't be able to 'publish' it via SCM for other developers to have the entire development environment 'ready to use'.

like image 197
Fabio Ceconello Avatar answered Oct 02 '22 10:10

Fabio Ceconello