Problem: After running a TFS2010 Gated Checkin Build, Reconcile Workspace leaves pending changes if Visual Studio 2010 is running with “Elevated” permissions.

Description:

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. 

image

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).

SNAGHTML149dcd49

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).

SNAGHTML14a37bfe

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. 

SNAGHTML14a92077

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. 

SNAGHTML14ada002

I hope this helps.

-Ben

 

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: info@benday.com

Share →

2 Responses to TFS2010: Reconcile Workspace after Gated Checkin is weird if Visual Studio 2010 is Elevated

  1. Sudheer says:

    Regarding gated-Check-in:

    Using Default Template
    Aganist Build Machine: BMachine
    TFS 2010 build service is running with some account name it as BService on BMachine

    When i do the Gated Check-in, its working fine and i am able to see the Check-in happening but leaving my checked-in file Chekout with BService account mapping to the workspace on BuildMachine

    Is Something can be done in here.?

  2. Jimmy Strube says:

    Another way to fix this is to elevate C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\BuildNotification.exe as well.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>