Visual Studio 2010 and TFS unwanted check out

tfsvisual studio 2010

I am using Visual Studio 2010 SP1 with Team Foundation Server 2010. Whenever I open a project, Visual Studio automatically checks the project file (.csproj) out (not any of the children files, however) and the corresponding .csproj.vspscc file out.

Whenever I compare the project file in my Pending Changes list, it says the files are identical for both the .csproj file and the .csproj.vspscc file — we just check them back in or undo the changes.

Can someone explain why it's doing this and how it can be fixed so it doesn't check out the .csproj and .vspscc file out every time we open the project?

Best Answer

We've had the same problem in my team. The problem was that one reference of the project was pointing to a different (wrong) directory of one of our team member's workspace. The solution of pantelif goes in the right direction, but comparing the csproj-Files with TFS won't help. For any reason it says the files are identical, but if I've had a manual look at them I realized they are not. You can easily check this :

  • Right click at the project
  • Select "Unload Project"
  • Right click again
  • Select "Edit xxx.csproj"

Now have a deeper look at the "ProjectReference"-Tags. In my case the "Include"-Attributes were not identical. Hope it will help you, too.

To avoid such problems, just have a look at the TFSGuide, especially at Chapter 3.