Archive

Posts Tagged ‘activity’

Custom Build Activities in TFS 2010

November 27th, 2009 Craig Tadlock 2 comments

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.

  1. Create a central solution and project for your custom activities; call the project Workflow
  2. Create your application solution and projects; lets call this solution Sunnyside.
  3. Under your Sunnyside solution root create a folder called Build
  4. Create a solution in this Build folder called BuildProcessTemplates
  5. Branch the Workflow project to BuildProcessTemplates folder. (This allows you to have a central place to code your activities)
  6. In this branched Workflow project create your custom build process template xaml files (Add them to the project; set the build action to None)
  7. 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

MSDN Forum Thread

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.

Custom Workflow Activities in TFS 2010 TeamBuild

November 21st, 2009 Craig Tadlock No comments

Jim Lamb has a great write up on how to build custom workflow activities for TeamBuild for TFS 2010. Given that some key activities are missing out of the box in beta two, it’s very likely you will find yourself writing a few of your own.

http://blogs.msdn.com/jimlamb/archive/2009/11/18/how-to-create-a-custom-workflow-activity-for-tfs-build-2010.aspx