每次打开我的 VS 解决方案时,我都会收到“最近已将项目添加到此解决方案中.您想从源代码管理中获取它们吗?" [英] Every time I open my VS solution I get “Projects have recently been added to this solution. Do you want to get them from source control?”

查看:20
本文介绍了每次打开我的 VS 解决方案时,我都会收到“最近已将项目添加到此解决方案中.您想从源代码管理中获取它们吗?"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道具体是怎么回事,但在某个时刻,我们毁了我们完整的 Visual Studio 解决方案.它不会再构建,不会清理,也不会找到任何参考.

I don't know exactly how, but on a certain moment we ruined our complete visual studio solution. It wouldn't build anymore, nor clean, nor find any reference.

经过数小时的搜索和尝试修复所有问题,我们发现一切都在构建并再次运行.

Afters hours of searching and trying to fix everything we got to the point that everything was building and running again.

但是......每次我们打开我们的解决方案时,我们都会收到消息最近已将项目添加到此解决方案中.您想从源代码管理中获取它们吗?".

However.. every time we open our solution we will get the message "Projects have recently been added to this solution. Do you want to get them from source control?".

这可能是由于试图修复一件事而破坏另一件事造成的.

This is probably cause by trying to fix one thing and breaking something else.

我们如何摆脱这条消息?

How do we get rid of this message?

推荐答案

多亏了一些研究和尝试了一些不同的选择,这就是在我们的案例中解决的方法.

Thanks to some research and trying some various options this is what solved it in our case.

1.从 TFS 解绑解决方案文件

从 TFS 解除绑定解决方案文件 (.sln).我们通过转到菜单 File => 来做到这一点(当然是在 Visual Studio 中).源代码管理 =>更改源代码管理.

Unbind the solution file (.sln) from TFS. We did this (in visual studio of course) by going to the menu File => Source Control => Change Source Control.

2.通过删除 globalsection 来清理解决方案文件

我们必须通过在文本编辑器中打开解决方案文件 (.sln)(我们使用 notepad++)来清理它.我们删除了所有出现的 GlobalSection(TeamFoundationVersionControl) = preSolution.包括前面提到的起始标签和结束标签EndGlobalSection.

We had to clean the solution file (.sln) by opening it in a text editor (we used notepad++). We removed all occurences of GlobalSection(TeamFoundationVersionControl) = preSolution. Including the mentioned starting tag and the ending tag EndGlobalSection.

3.再次将解决方案文件绑定到 TFS

最后我们再次将解决方案文件 (.sln) 绑定到 TFS.我们通过转到菜单 File => 来做到这一点(当然是在 Visual Studio 中).源代码管理 =>更改源代码管理

Finally we binded the solution file (.sln) to TFS again. We did this (in visual studio of course) by going to the menu File => Source Control => Change Source Control

感谢 http://www.nvisec.com/2008/09/vsts-projects-have-recently-been- added.html 经过几个小时的研究,他为我们指明了正确的方向.

Thanks to http://www.nivisec.com/2008/09/vsts-projects-have-recently-been-added.html who pointed us in the right direction after some hours of research.

这篇关于每次打开我的 VS 解决方案时,我都会收到“最近已将项目添加到此解决方案中.您想从源代码管理中获取它们吗?"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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