Text Transformation Toolkit Templates (T4) are frequently used to generate source code based on models, databases or other source code files. The Entity Framework entity classes and the context object are generated using T4 templates. The generated code becomes part of the currently opened solution. When the model is updated, the code will be updated on the next T4 generation as well. Generating the code only when required saves time. But what happens when somebody changes the generated code or the template is using source files which are not monitored? It will work… Until the next developer is executing the transformation again. Executing the T4 templates within the build process will show such issues early to the developer commiting the problem. But it is not that simple, when the template is using Visual Studio and the Host variable. Our solution: VisualStudioTextTransform.