Visual Studio 在哪里保存 SCM 相关信息?
我正在使用 Visual Studio (2005) + Perforce 组合来实现特定解决方案,并且我想手动修改 Perforce 参数(客户端名称)。
从 VS 的“Change Source Control”对话框来看,SCM 信息似乎是按项目保存的;但是,.csproj.vspscc 文件似乎不包含任何与 Perforce 相关的信息,.vssscc 也不包含。
.vspscc 文件如下所示:
""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
}
最后一行表明 SCM 设置存储在外部,但是存储在哪里?
I'm using a Visual Studio (2005) + Perforce combination for a particular solution, and I'd like to manually modify a Perforce parameter (the client name).
From VS's "Change Source Control" dialog it seems that SCM info is saved per-project; however, the .csproj.vspscc files don't seem to hold any Perforce-related information, and neither does .vssscc
Here's how a .vspscc file looks like:
""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
}
The last line suggests the SCM settings are stored externally, but where?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于本地工作副本,Perforce 将连接信息存储在 MSSCCPRJ.SCC 文件中。它看起来像这样:
.sln 文件中还有一些信息可以在用户之间传递,可能是出于遗留原因。如果 MSSCCPRJ.SCC 文件不可用,则可以使用此方法。
P4 使用或忽略这些设置的程度取决于它们的实现。
For your local working copy, Perforce stores the connection info in the MSSCCPRJ.SCC file. It looks like this:
There is also some information in the .sln file that can carry over between users, possibly for legacy reasons. This may be used if the MSSCCPRJ.SCC file is unavailable.
How much P4 uses or ignores those settings are dependant on their implementation.
请注意,您可以设置 P4CLIENT 环境变量来告诉 Perforce 您要使用哪个客户端;这并不能完全回答您的问题,但也许这是解决您问题的另一种方法。
另外,如果您使用 Visual Studio 进行 Perforce,您可以查看 NiftyPerforce 插件 ( http://code.google.com/p/niftyplugins/wiki/NiftyPerforceDocumentation),我一直觉得它比 Perforce 的好一点。
Note you can set the P4CLIENT environment variable to tell Perforce what client you want to use; this doesn't quite answer your question but maybe it's another way to solve your problem.
Also, if you're doing Perforce with Visual Studio, you might check out the NiftyPerforce plugin (http://code.google.com/p/niftyplugins/wiki/NiftyPerforceDocumentation), which I've always found a little nicer than the one from Perforce.
在文本编辑器上打开 vcproj 文件并找到以 Scc 开头的条目(SccProjectName、SccAuxPath、SccLocalPath、SccProvider...)。这些条目定义了项目的 SCC 绑定。
例如,由 Source Safe 控制的项目如下所示:
由 SVN 控制的项目看起来如下:
sln 文件具有您可以检查的类似条目
Open vcproj file on a text editor and locate entries starting with Scc (SccProjectName, SccAuxPath, SccLocalPath, SccProvider...). These entries define the SCC binding of the project.
As an example, a project controlled by Source Safe looks like this:
A project controlled by SVN looks line this:
sln files have similar entries that you can check