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

查看:34
本文介绍了我应该将 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天全站免登陆