Problem: After running a TFS2010 Gated Checkin Build, Reconcile Workspace leaves pending changes if Visual Studio 2010 is running with “Elevated” permissions.
First off, I’ve got to give credit where credit is due. The “what’s going on?” section for this post comes from Philip Kelley from Microsoft and the “fix” for this comes from Ed Blankenship (twitter).
I started having problems recently (after I rebuilt my laptop and started running as different user than Administrator) where doing a Reconcile Workspace didn’t seem to do anything.
I’d go to check in some changes to TFS2010 that would trigger a Gated Checkin build prompt.
I’d click Build Changes and the build would run, the build would pass, the changeset would get committed, and I’d get prompted to Reconcile my workspace (see the dialog below).
On the Gated Check-in dialog, I’d click Reconcile and then it would look like it was doing stuff. Unfortunately, when it was finished doing the Reconcile, I still had all my pending changes.
I started to wonder if there was a problem with the Build Notifications app so I started trying to use the Reconcile Workspace link on the completed build (see below).
This still didn’t work. None of my Pending Changes were cleaned up.
What’s going on?:
What’s going on here is that the two methods that I was using to the Reconcile are running as a non-Elevated version of my user account. You know how when you run Visual Studio 2010 and you right-click the icon and say “Run as administrator”? Yah…that’s making Visual Studio run as an Elevated user account.
Well, the non-Elevated features (eg. the Reconcile operations) are trying to talk to an Elevated instance of Visual Studio 2010. Guess what? No can do. So, even though it looked like the Reconcile was doing it’s job, it really actually wasn’t.
Ed pointed me toward another way to run the Reconcile that actually runs in the same credentials as everything else.
The Fix: Go to Build Explorer and locate the completed build that you want to Reconcile. Right-click the build and choose Reconcile Workspace.
I hope this helps.
– Want some help rolling out Team Foundation Server 2010? Got problems with your source control repository? Need some help coming up with a workable branching & merging structure? Drop us a line: firstname.lastname@example.org