我们使用 Perforce 和 Visual Studio。每当我们创建一个分支时,除非我们使用“ Open from Source Control”,否则一些项目将不会绑定到源代码管理,但是其他项目可以正常工作。根据我的调查,我知道一些相关的事情:
在我们的. csproj 文件中,有以下设置:
有时它们都设置为“ SAK”,有时则不是。如果上面写着“ SAK”,看起来事情就更有可能成功。
在我们的.sln 文件中,有许多项目的设置:
(The # is a number that identifies each project.) SccLocalPath is a path relative to the solution file. Often it is ".", sometimes it is the folder that the project is in, and sometimes it is ".." or "..\..", and it seems to be bad for it to point to a folder above the solution folder. The relativized one is a path 来自 that folder to the project file. It will be missing entirely if SccLocalPath points to the project's folder. If the SccLocalPath has ".." in it, this path might include folder names that are not the same between branches, which I think causes problems.
所以,为了最终得到我想知道的细节:
2012年6月新增: 我不再使用 Perforce,所以我不能保证它,但是看看下面的 KCD 的答案。显然 一个新的 P4 VS 插件正在开发中。希望它能把这些乱七八糟的东西都清理干净!