You do not need to write your own activities. Instead, try using TFS Build Extensions . There is a RoboCopy workflow that you can use to copy files. There are many other very useful actions, such as email activity, ...
Follow this nice guide to change the DefaultTemplate workflow or any workflow inside the BuildProcessTemplates folder.
source share