源代码控制解决方案中的某些项目没有挂锁图标 [英] No padlock icon for some projects in a source controlled solution

查看:30
本文介绍了源代码控制解决方案中的某些项目没有挂锁图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 TFS 源代码管理下的 Visual Studio 中有一个大型解决方案,但我注意到其中一个项目 (c#) 在解决方案资源管理器中旁边没有挂锁图标.

I have a large solution in Visual Studio that is under TFS Source Control but I've noticed one of the projects (c#) doesn't have a padlock icon next to it in Solution Explorer.

项目及其文件都在源代码控制之下,我可以查看历史记录并执行其他任务.没有一个文件有挂锁,但奇怪的是属性文件夹有.

The project and it's files are all under source control, I can look at the history and do other tasks. None of the files have the padlock, but strangely the properties folder does.

原因是什么,它损坏了什么以及如何修复它.

What is the cause, what does it break and how do I fix it.

推荐答案

唯一的错误是项目文件没有正确绑定到 TFS..csproj 文件中缺少一个部分,应如下所示:

All that is wrong is that the Project file does not have the correct binding to TFS. There is a section missing in the .csproj file that should look something like this:

<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>

其中 SAK(可能)代表解决方案已经知道.

Where SAK (probably) stands for Solution Already Knows.

据我所知,它只影响解决方案资源管理器中源代码管理状态的显示,如前所述,您已经可以对项目执行其他源代码管理任务.这并不多,但值得修复,因为这是一个很好的视觉检查,一切都在控制之中.

As far as I know it only affects the display of the Source Control status in the Solution Explorer as noted you can already perform other source control tasks on the project. It's not much but worth fixing as it's a good visual check that everything is being controlled.

要修复它,请在解决方案资源管理器中突出显示项目,然后转到文件 > 源代码管理 > 高级... > 更改源代码管理... 在该列表中选择有问题的项目(它可能看起来不错且有效),单击取消绑定,确定警告,然后单击绑定(重新标记了相同的工具栏按钮)确定该窗口,并签出它建议的所有文件.这将进行必要的更改,挂锁应该会出现.查看并检查更改以保留它们.

To fix it highlight the project in the Solution Explorer, then go to File > Source Control > Advanced... > Change Source Control... Select the project in question in that list (it'll probably look fine and valid), click Unbind, ok the warning then click Bind (the same toolbar button relabelled) Ok that window, and checkout all the files it suggests. This will make the necessary changes and the padlocks should appear. Review and check the changes to keep them.

这篇关于源代码控制解决方案中的某些项目没有挂锁图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆