Build fails when associating work items

Recently I ran into a strange problem. I modified a work item type definition and added a field. So far, so good. The field could be edited and everyone was happy.

But after that, my build failed. As you may or may not know you can choose to associate work items during a check-in (read more here). When you execute a build, all changesets are related to this build. If a work item is related to a changeset, the work item is also related to this build.


However, after the change the build failed with a strange error.

Cancelled the workflow instance for build vstfs:///Build/Build/35680 with ID {40b60155-a9ce-4f09-b4d5-68921da21a44}.Exception Type:System.Runtime.InteropServices.COMException

Exception Message:Error HRESULT E_FAIL has been returned from a call to a COM component.

When the change was reverted, the message still appeared.

After searching for quite a while we thought about the cache. The build server also has Visual Studio (Team Explorer) installed. VS caches a lot within the Team Explorer to improve performance.

So we cleared everything underneath the cache folder at

%localappdata%\Microsoft\Team Foundation\5.0\Cache


(when you paste %localappdata% in your explorer window it translates to c:\users\username\AppData\Local, so you can copy the bold line above and paste it as is ! For older versions change the 5.0

5.0 = 2013
4.0 = 2012
3.0 = 2010
2.0 = 2008
1.0 = 2005

and after that … it worked!

Hope this helps !

Comments are closed.

%d bloggers like this: