Question

I am using T4 in my project. I have a .tt file which is TextTemplatingFileGenerator I found that it won't generate the output unless I edit the .tt file. Is there a way to generate the output by building or compiling? It is important for me, because I am adding this .tt file in a VS project template, and this .tt file is reading another xml file in the same project template. and the project template will be used by all other developers. and when the developer edit that xml file and run the build, I want to re-generate the template. I don`t want to ask all developers to modify the .tt whenever they want to re-generate the output. thanks

Was it helpful?

Solution

You can trigger transformation without changing the template by selecting "Run Custom Tool" from the context menu in Solution explorer, or use MSBuild integration to transform your templates at build time.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top