Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
763 views
in Technique[技术] by (71.8m points)

visual-studio - 我应该将Visual Studio .suo和.user文件添加到源代码管理中吗?(Should I add the Visual Studio .suo and .user files to source control?)

Visual Studio solutions contain two types of hidden user files.

(Visual Studio解决方案包含两种类型的隐藏用户文件。)

One is the solution .suo file which is a binary file.

(一个是解决方案.suo文件,它是一个二进制文件。)

The other is the project .user file which is a text file.

(另一个是项目.user文件,它是一个文本文件。)

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

(我也一直想知道是否应该将这些文件添加到源代码控制中(在我的情况下是Subversion)。)

If I don't add these files and another developer checks out the solution, will Visual Studio automatically create new user files?

(如果我不添加这些文件而另一个开发人员检查解决方案,Visual Studio会自动创建新的用户文件吗?)

  ask by Ben Mills translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

These files contain user preference configurations that are in general specific to your machine, so it's better not to put it in SCM.

(这些文件包含通常特定于您的计算机的用户首选项配置,因此最好不要将其放在SCM中。)

Also, VS will change it almost every time you execute it, so it will always be marked by the SCM as 'changed'.

(此外,VS几乎每次执行时都会更改它,因此SCM始终将其标记为“已更改”。)

I don't include either, I'm in a project using VS for 2 years and had no problems doing that.

(我也不包括,我在使用VS 2年的项目中并没有遇到任何问题。)

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

(唯一的小麻烦是调试参数(执行路径,部署目标等)存储在其中一个文件中(不知道哪个),所以如果你有一个标准,你将无法'通过SCM发布'它,让其他开发人员可以使整个开发环境“随时可用”。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...