Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010 and TFS unwanted check out

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?

like image 313
Sean Avatar asked Oct 23 '22 17:10

Sean


2 Answers

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.

like image 70
Mr_T Avatar answered Dec 21 '22 10:12

Mr_T


I can answer part of this question. Why are the files shown to be identical?

The reason for this (as far as I can tell) is that when it auto checks out the file and makes the change, it isn't saving this change. Hence, when you just compare the files right away, it finds no differences. If you instead build the project, or manually invoke save on those modified files, then the changes will show up.

like image 39
Aland Avatar answered Dec 21 '22 10:12

Aland