Text Template Transformation Toolkit (T4)

InfoQ recently posted an article about a very interesting feature in Visual Studio 2008, Text Template Transformation Toolkit (also called T4). This toolkit is a standard feature of VS2008 and is all about generating text files based on templates. This toolkit is part of the Domain Specific Language Tools but it is certainly not limited to DSL’s. One example of using T4 which I think is quite interesting is the generation of config files for different deployment scenario’s, which can be found here.

Useful links:

  • T4 Editor by Clarius, a free template editor which is very useful because template support in VS2008 is very limited

The T4 toolkit is also available for VS2005 in the VS2005 SDK v4 and the Guidance Automation Toolkit (GAT).