是否应该将Visual Studio .suo和.user文件添加到源代码管理中? [英] Should I add the Visual Studio .suo and .user files to source control?

查看:64
本文介绍了是否应该将Visual Studio .suo和.user文件添加到源代码管理中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio解决方案包含两种类型的隐藏用户文件.一种是解决方案.suo文件,它是一个二进制文件.另一个是项目.user文件,它是一个文本文件.这些文件究竟包含什么数据?

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?

我也一直在想是否应该将这些文件添加到源代码管理中(在我的情况下为Subversion).如果我不添加这些文件,而另一位开发人员签出了解决方案,Visual Studio会自动创建新的用户文件吗?

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?

推荐答案

这些文件包含通常针对您的计算机的用户首选项配置,因此最好不要将其放在SCM中.另外,VS几乎每次执行时都会对其进行更改,因此SCM始终将其标记为已更改". 我也不参与其中,我在使用VS的项目中工作了2年,并且这样做没有任何问题.唯一的烦恼是调试参数(执行路径,部署目标等)存储在其中一个文件中(不知道是哪个文件),因此,如果您对它们有标准,则将无法通过SCM将其发布以供其他开发人员使用,以使整个开发环境随时可用".

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'.

这篇关于是否应该将Visual Studio .suo和.user文件添加到源代码管理中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆