How to Extend Team Foundation Build

This is an excellent article on how to extend the build capabilities of Team Foundation Server to include custom tasks to be added after the build process runs. As you know, TFS Build implements MSBuild. Since MSBuild is a robust utility to compile .NET projects, you can easily modify the behavior and have TFS Implement it (via XML .proj files in TFS which are essentially MSBuild scripts). This link comments on some of that, while also revealing the programmatic nature of the build capability. You can craft your own build .dlls and attach them to the build script. One of the primary reasons to modify TFS Build is to have it compile your deployment and setup projects which TFS does not natively support.

https://msdn2.microsoft.com/en-us/library/ms400767.aspx