visual-studio 当我将文件添加到项目时,为什么 Visual Studio 会检出 .vspscc 文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3120749/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Why does Visual Studio check out the .vspscc file when I add a file to a project?
提问by kenwarner
If I add a new file to a project under TFS source control, it will check out the project file and the corresponding .vspscc file for that project file.
如果我将新文件添加到 TFS 源代码控制下的项目,它将检出项目文件和该项目文件的相应 .vspscc 文件。
The project file itself changes (to include the new file), but the .vspscc file doesn't change at all. Why bother checking it out? Is there a way to disable it from being checked out and if there is, should I?
项目文件本身发生了变化(以包括新文件),但 .vspscc 文件根本没有变化。为什么要检查它?有没有办法禁止它被检出,如果有,我应该吗?
采纳答案by Caladain
It gets checked out because under certain conditions it will be modified..and thus they checked it out as a matter of default. I wouldn't worry about it..it's not hurting anything, and if you disable it, it might bite you badly in the future in a bizarre way.
它被检出是因为在某些条件下它会被修改......因此他们默认将其检出。我不会担心它......它不会伤害任何东西,如果你禁用它,它可能会在未来以一种奇怪的方式严重咬你。
回答by Paulo Santos
According to this postof Ben Ryan:
根据Ben Ryan 的这篇文章:
Team Foundation uses these to store lists of files that have been excluded from source control. We leveraged some of the existing SCC integration layer in Visual Studio to integrate Team Foundation, and these files were one of the carryovers. I'll have to check into what the logic was in breaking out these SCC settings into separate files as opposed to putting them in the solution and project files' SCC sections.
Team Foundation 使用这些来存储已从源代码管理中排除的文件列表。我们利用 Visual Studio 中现有的一些 SCC 集成层来集成 Team Foundation,这些文件是遗留文件之一。我将不得不检查将这些 SCC 设置分解为单独文件的逻辑是什么,而不是将它们放在解决方案和项目文件的 SCC 部分中。
回答by Robert J. Good
This file is a holdover from past VSS/TFS implementations, like Paulo Santos posted.
这个文件是从过去的 VSS/TFS 实现中保留下来的,比如 Paulo Santos 发布的。
On the solution level, I have found no functional use for these files. In 10 years of using TFS, I have never seen that file altered. You can delete these .VSSCC files, as I commonly do for my closed source solutions.
在解决方案级别,我发现这些文件没有任何功能用途。在使用 TFS 的 10 年中,我从未见过该文件被更改过。您可以删除这些 .VSSCC 文件,就像我通常为我的封闭源代码解决方案所做的那样。
But if you delete the solution-level .vsscc file, you will get a non-destructive error message on the first time open of the solution file...only after a new branch is created. All subsequent solution opening will not show the error message again.
但是如果您删除解决方案级别的 .vsscc 文件,您将在第一次打开解决方案文件时收到非破坏性错误消息……只有在创建新分支之后。所有后续的解决方案打开都不会再次显示错误消息。
My TFS setup standards have the solution file alone in the root folder, all projects are under sub-folders. Since those .vsscc files double the number of files in my root, I always delete them.
我的 TFS 设置标准在根文件夹中有单独的解决方案文件,所有项目都在子文件夹下。由于那些 .vsscc 文件使我的根目录中的文件数量增加了一倍,因此我总是将它们删除。
On a project level, I leave those files, as my team never opens project files directly, only solution .SLN files.
在项目级别,我保留这些文件,因为我的团队从不直接打开项目文件,只打开解决方案 .SLN 文件。
For my team, I prefer programmer ease of opening solutions over that one-time error message.
对于我的团队,我更喜欢程序员轻松打开解决方案而不是一次性错误消息。

