Why does Visual Studio keep checking some project files out?
I was on site with a customer recently when I was asked why Visual Studio would automatically check out project files when getting latest (or specific) from TFS.
I had a look and, sure enough, there were 3 project files checked out with pending changes. The first thing they tried was to undo the pending changes (meaning the project files were no longer checked out) but then the minute they got latest, or even tried to
build the project, VS would check out those project files.
I checked with some of the other developers and, unbeknownst to them,
they had the same projects checked out too. Weird.
So, we did a Compare to see what, exactly, VS was doing to these files and it turned out that Visual Studio was fixing a bad HintPath in the project. Changing it from an absolute path (that was invalid on this machine) to a relative one. Wow!
Now this seems like a missed opportunity to me. I am pretty impressed that Visual Studio can do this (and still not sure quite how it does it). If only VS had prompted the user with something like this:

Then we'd have customers as impressed with this as I am, and not lamenting the stability of VS & TFS. Still, problem solved and nice to know VS is looking out for me.

Post By
Josh Twist
1:15 AM
01 Aug 2008
Comments:
Posted by
Inferis
@
01 Aug 2008
5:41 AM
Or, thry might start complaining about that pesky HintPath dialog always appearing. :)
So a: "Don't show this message again" in combination with detecting if the file needs to be checked out to modify the file (I suspect there are people not using source control), would be perfect.