Team Build (XAML) fails with error TF215097

280 Views Asked by At

After weeks of normal operation, TFS 2015 XAML builds suddenly fail with error TF215097.

enter image description here

TF215097: An error occurred while initializing a build for build definition \xxxxxxxxxxxxx\xxxxxxxxxxx-DEV: 
Exception Message: A procedure imported by 'Microsoft.VisualBasic.Activities.Compiler.dll' could not be loaded. (type FileLoadException)
Exception Stack Trace:    at Microsoft.VisualBasic.Activities.VisualBasicHelper.CompileT
   at Microsoft.VisualBasic.Activities.VisualBasicHelper.CompileT
   at Microsoft.VisualBasic.Activities.VisualBasicHelper.CompileT
   at Microsoft.VisualBasic.Activities.VisualBasicValue1.CacheMetadata(CodeActivityMetadata metadata)
   at System.Activities.CodeActivity1.OnInternalCacheMetadataExceptResult(Boolean createEmptyBindings)
   at System.Activities.Activity1.OnInternalCacheMetadata(Boolean createEmptyBindings)
   at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindings, IList1& validationErrors)
   at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childActivity, ChildActivity& nextActivity, Stack1& activitiesRemaining, ActivityCallStack parentChain, IList1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback)
   at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList1& validationErrors)
   at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, LocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList1& validationErrors)
   at System.Activities.Validation.ActivityValidationServices.InternalActivityValidationServices.InternalValidate()
   at Microsoft.TeamFoundation.Build.Workflow.WorkflowHelpers.ValidateWorkflow(Activity activity, ValidationSettings validationSettings)
   at Microsoft.TeamFoundation.Build.Hosting.BuildProcessCache.LoadFromXaml(String workflowXaml, TextExpressionImports textExpressionImports)
   at Microsoft.TeamFoundation.Build.Hosting.BuildControllerWorkflowManager.PrepareRequestForBuild(WorkflowManagerActivity activity, IBuildDetail build, WorkflowRequest request, IDictionary`2 dataContext)
   at Microsoft.TeamFoundation.Build.Hosting.BuildWorkflowManager.TryStartWorkflow(WorkflowRequest request, WorkflowManagerActivity activity, BuildWorkflowInstance& workflowInstance, Exception& error, Boolean& syncLockTaken)

The build definitions themselves and the build activities used haven't changed in the mean time.

The environment is running Visual Studio 2015 update 1, Team Foundation Server 2015 Update 1 on Windows Server 2012r2.

1

There are 1 best solutions below

0
On BEST ANSWER

It turns out that this error is caused by the installation of a couple of hotfixes which were delivered through Windows Update. The following KB article explains exactly what the root cause is.

Uninstallation of KB3097997 and KB3098779 and a reboot of the server solved the issue. After the reboot the hotfixes were automatically re-applied without the issue resurfacing.

Thanks to my colleague Jasper for validating :).