5

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?

Sean
  • 2,496
  • 7
  • 32
  • 60
  • I hate integrated source control. – Steve Wellens Jul 02 '12 at 15:33
  • For some _unknown_ to me reason, vs2010 usually keeps all changes in solution/project configuration in memory And vs2010 isn't going to save them to disk, until you clearly ask to do this by triggering _Save All_, or close project. Thus, it's easy to imagine situation when you're updating from source control and lost all your changes in memory. May be this behaviour required to checkout project files in advance. This is only my personal opinion based upon working with vs2010. – Akim Jul 02 '12 at 16:16
  • possible duplicate of [How to stop Visual Studio from "always" checking out solution files?](http://stackoverflow.com/questions/1085978/how-to-stop-visual-studio-from-always-checking-out-solution-files) – LosManos Sep 11 '14 at 13:28

5 Answers5

2

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.

Mr_T
  • 193
  • 1
  • 6
1

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.

Aland
  • 51
  • 2
0

It's not clear exactly what the steps you are taking to make the problem occur, but I assume you mean that this occurs in such a way that when you open a solution, all of the project files in a solution are automatically all checked out.

This is not the normal behavior, so you might have a 3rd party utility that is performing actions on your project files; maybe it edits them and then put them back the same way. Check for and disable any add-ins (Tools Menu -> Ad-In Manager) and you can also check what other extension you might have installed using the Extension Manager (also in the tools menu).

Ryan Riehle
  • 954
  • 4
  • 13
  • When I do a compare, it says the files are identical. Which why I'm so puzzled by this. – Sean Jul 05 '12 at 21:49
  • @Sean It may be that there is more than 1 file making up the "project" appearing in VS. Do you have any "user" configuration files checked-in to source control (like *.csproj.user, *.suo, or *.csproj.webinfo)? These should be excluded from source control. Also, did you find any add-ins or extensions that are loaded that might be altering the behavior of VS? Finally, what are the project types/templates used to create the projects in your solution; Are they a mix standard templates? – Ryan Riehle Jul 06 '12 at 18:42
  • Only the .csproj project file is checked into source. I do have 3rd party extensions installed, but co-workers are experiencing the same issues (and they don't have the same extensions installed). They are standard project templates, nothing out of the ordinary. – Sean Jul 06 '12 at 20:33
0

VS is probably resolving a linking issue, typically for a referenced assembly.
In order to check what is happening, just open your solution & once VS has checked out the *.csproj, 'save all' (Ctrl+Shift+S).

Navigating to your "Pending Changes" window and comparing the *.csproj should reveal the issue.

pantelif
  • 8,524
  • 2
  • 33
  • 48
  • 3
    When I do a compare, it says the files are identical. Which why I'm so puzzled by this. – Sean Jul 05 '12 at 21:48
0

Same problem used to happen with my solution too,later on i found out,that IIS which i configured in my local had different VD name ,where as in TFS server, different VD name was assigned and checked in. So when i open my solution,It automatically checkes out .sln file. as my local VD is different mapped to my local.

piyush nath
  • 89
  • 1
  • 8