简体   繁体   中英

TFS 2015 XAML Build Failed

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)

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. 在此输入图像描述 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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM