Share via


Build problems after upgrading from TFS2010 to TFS2012

Recently our TFS Server have been upgraded to TFS2012 + QU1 + CU1. In order to be able to use our Build Server we have had to upgrade it from TFS2010 to TFS2012 as well and, of course, we have found a couple issues related to the build process templates that we had defined which do not allow us to make a builds successfully.

I have to mention that we have only found this errors with customized build process templates (the default build process templates worked fine).

The first error that we got after the upgrade has been:

TF215097: An error occurred while initializing a build for build definition  \XXXX\XXXX :

Exception Message: The root element of the build process template found at $/XXXXXX/XXX/yyyyTemplate.xaml (version C87013) is not valid. (The build process failed validation. Details:

Validation Error : Compiler error(s) encountered processing expression "New Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings()". 'BuildSettings' is ambiguous in the namespace 'Microsoft.TeamFoundation.Build.Workflow.Activities'.

Validation Error : Compiler error(s) encountered processing expression "Microsoft.TeamFoundation.Build.Workflow.Activities.CleanWorkspaceOption.All". 'CleanWorkspaceOption' is ambiguous in the namespace 'Microsoft.TeamFoundation.Build.Workflow.Activities'.

<...>

 

The solution to this error is to remove explicit references to the TFS2010 object model in the process template. I have found the solution and the explanation in this blog post (plus some code to make the cleanup process pretty simple):

 https://blogs.msdn.com/b/jpricket/archive/2012/07/17/tfs-2012-cleaning-up-workflow-xaml-files-aka-removing-versioned-namespaces.aspx

 

Then, the second error that we got was:

 

TF215097: An error occurred while initializing a build for build definition \XXXX\XXXX:

Exception Message: The values provided for the root activity's arguments did not satisfy the root activity's requirements:

'DynamicActivity': Expected an input parameter value
of type 'Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings' for parameter named 'BuildSettings'.
'DynamicActivity': Expected an input parameter value of type 'Microsoft.TeamFoundation.Build.Workflow.Activities.TestSpecList' for parameter named 'TestSpecs'. Parameter name: rootArgumentValues (type ArgumentException)

Exception Stack Trace: at
System.Activities.Validation.ActivityValidationServices.ValidateRootInputs(Activity
rootActivity, IDictionary`2 inputs)

   <...>

In this case, the problem was related to the fact of the build service using the previous bits of TFS object model and the solution was to remove the previous version (TFS2010) from the build server. The explanation can be found in this post:

https://connect.microsoft.com/VisualStudio/feedback/details/775699/builds-are-failing-after-tfs2010-to-tfs2012-update1-upgrade

 

Hope this helps!