English 中文(简体)
让Visual Studio忽略解决方案中的源代码绑定
原标题:
  • 时间:2009-04-28 10:59:33
  •  标签:

Is there a way to tell Visual Studio 2005 to just ignore source control binding when opening a solution? I sometimes need to load a solution for which I don t have access to the source control server, but Visual Studio insists on trying to connect anyway, meaning I have to click "temporarily work offline in disconnected mode" for every project in the solution (of which there are about 20) as it loads. For some reason, it also tries to check each project out immediately after I ve told it to work offline, so I have to click past that dialog box too.

既然我永远不需要编辑这个解决方案中的任何内容,有没有办法打开它,让Visual Studio忽略它具有源代码控制绑定的事实?

Edit: Ideally, I d like a way to do this without having to change the project/solution files. They change fairly frequently, so I d have to redo any changes every time there was a new version (otherwise I d just unbind them once and it wouldn t be a problem).

谢谢目前为止的回应。

问题回答

The source control bindings are stored in Visual Studio solution file (.sln). For TFS for example, it contains a global section for TFS information and the solution projects added to TFS. You can edit the solution file to remove these bindings manually. I would suggest making a copy of the solution file first. However, I would recommend removing bindins via Visual Studio. Open your solution and go through the offline scenario. Then go to File/Source Control/Change Source Control (VS 2008) to bring up the UI that shows you the source control bindings in your solution. There you can manage the bindings including unbinding them. Once unbound, the next time you open the solution, VS should not have a need to access the source control.

I ve been looking for a way to disable Integration between SourceSafe 2005 and Visual Studio 2008. We are forced to use SourceSafe being in a corporate environment and all. SourceSafe is fine on its own if you treat it like a baby. As soon as you try to do anything approaching useful it starts to break. God forbid you try to use the integration with Visual Studio. Being that I didn t want the "Bindings removed" so that it doesn t confuse other devs on the team I needed to be able to tell Studio to ignore the solution and project bindings and continue on it s merry way.

I followed the registry hack suggested in the following post Removing SourceSafe Integration from Visual Studio 6

Studio did what I wanted...sort of. It removed the SourceSafe integration. However when I opened up a source controlled solution it asked me if I wanted to remove the bindings.
"the projects will be treated as not under source control"

不,我不要你从文件中删除绑定,我想让你忽略它们。每次打开解决方案或项目文件时都会弹出此对话框,没有绕过它的办法。

My solution at the moment seems to have worked...for now.

文件->源代码控制->更改源代码控制...->断开连接

I hope this helps anyone else in the position of having to use SourceSafe but can t remove the bindings from the files themselves. WHY, Microsoft, WHY would you put the bindings in the files themselves? /rant





相关问题
热门标签