Thursday, February 23, 2012

TFS 2010 Reconcile Workspace

From time in time Visual Studio 2010 don’t reconcile the workspace after a gated check-in. I’ve seen that this happens regularly if UAC is enabled, Visual Studio is running under elevated permission and the reconcile operation is started from the Build Notification tool’s MessageBox, how well documented in this blog post.
However, for some other reasons that I don’t know, sometime Visual Studio (or maybe the Source Control plug-in) simply refuses to reconcile the workspace.
In that case I know a good persuader: the Team Foundation Server 2010 Power tools. It expose a command that permits you to undo the unchanged file. Basically it do a compare between the TFS latest version and the current workspace, then execute an “undo"  on all files that are identicals.
So… let’s intall the TFS Powertools and execute “tfpt uu”  from the command line in the main folder of our workspace and the command will do the trick. Unfortunately Visual Studio isn’t smart enough to self notice that the status of files has changed, but we can always use “File/Source Control/Refresh Status” and avoid a really uncomfortable restart of the IDE.


Yes, first post in english after a long silence. Why ? It’s not to spread the word about my english ignorance, but all of the readers of the previous post came from abroad, so why force them to Google translator ? Additionally, the blog it’s all around the .NET world, and I believe that every Italian developer know english enough (probably better than me)!