A generic post build solution for SDL Tridion templates

Tridion, Tips & Tricks, Templating

When developing compound templates for SDL Tridion you might want to use the Post Build trick that is explained in the SDL Tridion docs here, but there is a generic solution for all of your projects.

First create a TcmUploadAssembly directory in the root of your solution folder. Put the TcmUploadAssembly files there and generate the config.xml here too. Just use the following command in the command shell to do that:

TcmUploadAssembly.exe config.xml

After that update the post build events for all of your project with this command:

$(SolutionDir)TcmUploadAssembly\TcmUploadAssembly.exe /verbose $(SolutionDir)TcmUploadAssembly\config.xml $(TargetName).dll

This command will work for all of your projects in your solution. Copy / Paste away!

Please note that this is a only a solution when working alone on a project. When working in a team please refer to a Continuous Deployment solution. It might be that you are overwriting the work of your colleagues. Through Continuous Deployment the Continuous Integration server will do the deployment.