Custom Build Activities in TFS 2010
To build real world applications with TFS you will need to code some custom activities; the ones out of the box are not enough. There are several good resources for how to build these activities (see below). But there are some issues in Beta 2 that make the process a bit difficult. The issue is trying to get your custom activities to show up in the build process template workflow designer. Hopefully this gets fixed in the RTM version, but for now here’s what you can do.
Quick note about my setup, I have a single project that has all the custom workflow activities and several other applications that have their own builds that will use these activities. I dont want copies of my custom activities all over the place.
- Create a central solution and project for your custom activities; call the project Workflow
- Create your application solution and projects; lets call this solution Sunnyside.
- Under your Sunnyside solution root create a folder called Build
- Create a solution in this Build folder called BuildProcessTemplates
- Branch the Workflow project to BuildProcessTemplates folder. (This allows you to have a central place to code your activities)
- In this branched Workflow project create your custom build process template xaml files (Add them to the project; set the build action to None)
- Now you will be able to open the BuildProcessTemplates solution, open the xaml file and be able to add the custom activities.
What a pain! Again, I hope this is fixed for RTM. Here are a few references…
How to create a custom workflow activity for TFS Build 2010
TFS Team Build 2010: Working with Custom Code Activities
EDIT
After spending way too long on this Ive made some improvements. You dont actually have to branch the custom activities folder over, you can just add a DLL reference. The key is that in order to get the activities to show up in the toolbox you must use the “Choose Items…” -> “System.Activities Components” tab -> “Browse…” to the DLL. If you just add a normal DLL reference it wont work.