3
votes

I migrated a collection from TFS 2012.2 to a new TFS 2015, I configured XAML build agent for that collection, when I tried to run the build, it failed during "Associate Changesets and Work Items" activity.

From the stack trace, I can see it couldn't change the work items, I tried to reproduce the case with a small project with the same everything but it worked fine?!

The build log:

Exception Stack Trace: at Microsoft.TeamFoundation.WorkItemTracking.Proxy.WorkItemServer.Update(String requestId, XmlElement package, XmlElement& result, MetadataTableHaveEntry[] metadataHave, String& dbStamp, IMetadataRowSets& metadata)

at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.SendUpdatePackage(XmlElement package, XmlElement& result, Boolean bulk)

at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.SaveWorkItems(WorkItem[] workitems, Boolean bulk, SaveFlags saveFlags)

at Microsoft.TeamFoundation.WorkItemTracking.Client.BatchSaveHelper.TryUpdate(WorkItemStore store, WorkItem[] workitems, SaveFlags saveFlags, List`1 errors)

at Microsoft.TeamFoundation.WorkItemTracking.Client.BatchSaveHelper.TryUpdate(WorkItemStore store, WorkItem[] workitems, SaveFlags saveFlags, List`1 errors)

at Microsoft.TeamFoundation.WorkItemTracking.Client.BatchSaveHelper.BatchSave(WorkItemStore store, WorkItem[] workitems, SaveFlags saveFlags)

at Microsoft.TeamFoundation.Build.Workflow.Activities.WitBatchSaveWorkItems.Execute(CodeActivityContext context)

at System.Activities.CodeActivity`1.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)

at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Event Log:

Default Controller - tfsbuild: Cancelled the workflow instance for build vstfs:///Build/Build/430 with ID {2da10eef-3c75-48ce-852b-78436a594f85}. Exception Type:System.NullReferenceException Exception Message:Object reference not set to an instance of an object. Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

2
Did you ever find a solution to this issue?Johny Skovdal
are you using TFS 2012 controller to build?Angshuman

2 Answers

0
votes

This is NOT a solution but a workaround:

In your build definition you can disable the setting: "Associate Changesets and Work Items" by setting it to false. This should make the checkin work. It is found under ->Process->Advanced->Associate Changesets and Work Items. enter image description here This is a valid solution in my case because I don't need the associations but it might not always be OK to leave the associations out.

0
votes

Please follow the below steps

1.)Stop the Build Service on the Build Machine
2.)Delete the folders inside the below path in build machine – C:\Users\
    [BUILDSERVICEACCOUNT]\AppData\Local\Microsoft\TeamFoundation\5.0
3.)Start the Build Service on the Build Machine