TFS 2012 build definition: Parameter Items to Build: cannot convert value Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings

StackOverflow https://stackoverflow.com/questions/16163666

Question

After a lot of editing of my build templates (I recreated them in 2012 to avoid any issues.. but then I suppose I got sloppy and simply copy/pasted whole blocks from the old workflow, and I suppose that must have completely destroyed my versioning) I now have problems with just one build definition based on the build template I edited. (All other ones seem to be working fine.. so I suppose that one got a problem during all the editing. (I was mostly adding and removing Version=11.0.0.0 to the assemblies in the build template))

The exact error is:

Parameter Items to Build: cannot convert value 'Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings' of type Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings to type Microsoft.TeamFoundation.Build.Workflow.Activities.Buildsettings, reset to default.

It is displayed when editing the build definition and wanting to select the project/solution and configuration to build. Actually, with this now I cannot save (without error) any more and the value gets deleted again.

(I am using VS 2012 (VS 2010 still installed) against TFS 2012.)

How to fix?

Was it helpful?

Solution

Open up your XAML and look at the xmlns's on the Activity root node:

Here's a snipped version of mine:

<Activity mc:Ignorable="sads sap sap2010" <!--Removed-->
 xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:mt="clr-namespace:Microsoft.TeamFoundation;assembly=Microsoft.TeamFoundation.Common"
 xmlns:mtbc="clr-namespace:Microsoft.TeamFoundation.Build.Client;assembly=Microsoft.TeamFoundation.Build.Client"
 xmlns:mtbw="clr-namespace:Microsoft.TeamFoundation.Build.Workflow;assembly=Microsoft.TeamFoundation.Build.Workflow"
 xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow"
 xmlns:mtbwt="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Tracking;assembly=Microsoft.TeamFoundation.Build.Workflow"
 xmlns:mttbb="clr-namespace:Microsoft.TeamFoundation.TestImpact.BuildIntegration.BuildActivities;assembly=Microsoft.TeamFoundation.TestImpact.BuildIntegration"
 xmlns:mtvc="clr-namespace:Microsoft.TeamFoundation.VersionControl.Client;assembly=Microsoft.TeamFoundation.VersionControl.Client"
 xmlns:mtvc1="clr-namespace:Microsoft.TeamFoundation.VersionControl.Common;assembly=Microsoft.TeamFoundation.VersionControl.Common"

Look for Version Specific references (usually "10.0" or "11.0") and remove them so they look like the ones I have above.

Also, check you project references and ensure that they are not Version Specific.

OTHER TIPS

Here is HOW to change the assemblies in your TFS Template:

  • In Source Control Explorer, browse to the BuildprocessTemplates and open (double-click or choose "View" from the Right Click menu) the template that your build is based on (the one giving you the above error)
  • You should see a visual diagram of the workflow. At the bottom are three tabs: Variables, Arguments, and Imports. Click on Arguments.
  • Select the BuildSettings Argument
  • Find the Properties box. The properties for an arguement are: ArgumentType, Direction,IsRequired, Name, and Value.
  • Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings should be the selected Type but the problem is (typical) you can't tell which version of this assembly is selected. Click the drop down.
  • At the bottom of the list choose "Browse for Types..."

NOW you can see all of the available assemblies and their versions. Choose the one you want, most likely upgrade to the latest. Be sure to go through all of the various arguements and make sure their types are all are set to the same version to ensure compatibility.

You may encounter issues now saving the file. All may appear to be ok. TFS indicates it knows the file has changed, checkin seems to go smoothly, but when the file is opened the assemblies still reflect v 10. If you open the same file from the file system you may find that the assemblies in the file really are v 11. What give? No idea. Some sort of glitch in VS.

But here is a work around:

  1. Uninstall VS 2010 Team Foundation Server Power Tools from your development machine
  2. Open VS 2012 and make sure the template has no pending changes (undo) and get latest version
  3. CHECK OUT FOR EDIT (important) but do not make any changes in VS (it won't open anyway since the 10 assemblies were uninstalled in a previous step)
  4. Close VS 2012 (important because if it is open it will appear that your change didn't take)
  5. Open the template from the file system (I used notepad to eliminate any interference from VS) and perform a find/replace on "Version=10.0.0.0" with "Version=11.0.0.0" and save the file
  6. open VS 2012 and now you should be able to see the workflow designer
  7. Of course, check in the file
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top