How to stop Visual Studio from “always” checking o

2019-01-07 05:11发布

For apparently no reason, every time I open my solution, Visual Studio checks the sln file out.

If I compare it to the previous version there are no changes. But this is really frustrating since everybody has the solution checked out.

I'm using VS 2008 and TFS 2008, both SP2.

Any idea on how I can stop this thing to happen? Or is a feature/bug of the TFS source control provider for VS?

8条回答
甜甜的少女心
2楼-- · 2019-01-07 05:37

It is a feature/bug of one of the project systems being loaded within the solution. Try removing various types of projects (C#, VB, C++, web site, web app, unit test, silverlight...) until it goes away; that's your answer.

查看更多
Root(大扎)
3楼-- · 2019-01-07 05:40

Allow the check-out and then compare both files. If VS added something like

<Service Include="{B4F97281-0DBD-4835-9ED8-7DFB966E87FF}" />

you are experiencing a VS bug with a solution in VS2008 but not ported to VS2005

Check this link for further details:

查看更多
Lonely孤独者°
4楼-- · 2019-01-07 05:40

The Visual Studio Solution file is being silently checked-out through one or more of the Solution's Projects using the Microsoft Enterprise Library - I believe this is something to do with the Enterprise Library Configuration Utility which allows the configuration management of the various Application Blocks - http://msdn.microsoft.com/en-us/library/ff649479.aspx

See this Microsoft Feedback posting: http://connect.microsoft.com/VisualStudio/feedback/details/737184/globalsection-extensibilityglobals-postsolution-checks-out-sln-file-on-open

查看更多
Summer. ? 凉城
5楼-- · 2019-01-07 05:43

Just in case, like me, you couldn't get it to work and you find that one or more projects also get checked out, I found a simplier solution. Make a note of the project(s) that it keeps checking out. Go to File - Source Control - Change Source Control, and then unbind the projects in question. Click OK, Save All, then go back into Change Source Control and bind teh project back to the solution. Hopefully this will work for others

查看更多
冷血范
6楼-- · 2019-01-07 05:49

Although not preventing the problem in the first place, liberal use of the Team Foundation Power Tools "Undo Unchanged" command will (surprise surprise) undo the pending edit if no changes have been made.

查看更多
欢心
7楼-- · 2019-01-07 05:50

This happens when the following is in the .sln file:

GlobalSection(ExtensibilityGlobals) = postSolution
    MyGlobalProperty = AnyValue
EndGlobalSection

I found that Enterprise Library added one of these. I removed it, checked in the solution, closed then re-opened it, and no more automatic check out.

查看更多
登录 后发表回答