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?
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'.
您不需要添加这些内容 - 它们包含每个用户的设置,而其他开发人员不会需要您的副本。
Others have explained why having the *.suo
and *.user
files under source control is not a good idea.
I'd like to suggest that you add these patterns to the svn:ignore
property for 2 reasons:
上一篇: 仅为调试构建构建事件