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
01:15
01 Aug 2008
» Next Post:
WCF: The type provided as the Service attribute could not be found
« Previous Post:
Updated data-binding friendly script for Data Services
Comments are closed for this post.
Posted by
Inferis
@
01 Aug 2008
05:41
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.
Posted by
red
@
18 Sep 2009
08:09
for some reason, occasionaly a get latest will get me some other developers 'checked out' list so that VS thinks I have them checked out.
First step is always to 'undo checked out'