With the new build engine based on Workflow 4 in Team Foundation Server 2010, creating build definitions and automatic builds became a lot easier. One of the most useful activities is the InvokeProcess activity. This activity offers the following important properties:
- Arguments: the argument values you want to pass to the invoked process
- FileName: name of the process you want to execute
- WorkingDirectory: location from which the process should be invoked.
One feature that makes debugging a lot easier is that you can setup the activity for logging(by default nothing will be logged other than the command line invoked). If you expand the activity in the designer, you can see that the Standard and Error output is captured in two variables(stdOutput and stdError). You can then add the WriteBuildMessage and WriteBuildError activities by dragging them from the toolbox into the handler areas of the InvokeProcess activity.