Lately I am quite busy with building Custom Build activities for TFS 2012. I also did this in TFS 2010 but it seems that I avoided some issues there.
In my previous blog posts I described some migration issues with TFS build. This is about an issue I had with Custom Build Activities.
- Error when copying Build Template “The type ‘TfsBuild.Process’ already contains a definition for
- Upgrading your Custom Build Template to TFS 2012
- Lessons learned in upgrading my TFS 2010 Build templates to TFS 2012
- Microsoft.TeamFoundation.Build.Client.IProjectFile’ is obsolete
Build Controller – Version Control Path to custom assemblies
I walked into this issue when I refactored my custom build solution that I initially build in VS2010 to VS2012. Everything worked like a charm in VS2010 but not in VS2012. When opening my custom template in the build definition editor, it behaved strange.
My Custom Types were not recognized and all the information I had configured in the Build Template Meta Data was not displayed correctly. My display names and categories were missing. I saw ..
When digging a bit through the error messages and in the build output window I remembered the Build Controller Path to the Custom Assemblies.
The error was in here !. When I first deployed my Custom Build Assemblies I deployed the contents of the bin directory. So this included my TeamFoundation assemblies. This always worked because my assemblies were referencing TFS 2010 and the build server was also referencing TFS 2010. Now that I upgraded to TFS 2012 the references became invalid because the build server required VS 2012 assemblies but only found VS 2010 instead.
When I removed the VS2010 assemblies from the Custom Assemblies Path, everything worked like a charm.