In the last post I wrote about the new features in the new coming version of the
TFS 2010. In the next posts I will try to give a closer look on every feature.
TFS 2008 Build script editing
In TFS 2008 the build script was written in xml based on Msbuild scripts.
Which means that editing the script was pretty ugly and annoying method.
This scripts defines the targets and tasks to run in the build but the schema
was never updated to recognize all the new targets and tasks so you didn’t
really got help by the Intellisense. Beside that, when writing custom tasks, there
is no way that the script will recognize your task and help you call it with the
right parameters and syntax.
And the worst thing is that there is no way to debug it on runtime. The
only way to debug it is by inserting custom messages in the log and review it
afterwards. Ugly!
TFS 2010 Build script editing
In TFS 2010 the build script is written in a new modern language: Workflow 4.0.
This means that the language is fully supported and much easy to edit and
maintain as writing any application in Workflow. All steps (aka targets) are known
and recognized by the Intellisense. Every custom activity you write (aka tasks) is
fully recognized - no more guessing for the right syntax.
(BTW Aaron wrote a great post on how to write custom activity.)
And the most exiting thing is that now you can debug it at runtime
Here is how you do it:
- open the process template project file
- right click where you want in the flow and add break point
- click Debug menu –> Attach to process
- find the TFSBuildServiceHost and attach to it
(don’t forget to mark the show process from all user in all sessions)
- run the build and wait for the break point to be hit
- now you can debug it as any application
Enjoy !