Showing posts with label Visual Studio Extensibility. Show all posts
Showing posts with label Visual Studio Extensibility. Show all posts

Wednesday, February 9, 2011

Executing a T4 Template from the command line

A T4 Template is normally added to a project and this gets executed whenever the user adds the template to the project / whenever a user saves the text template. Now i had a requirement when i needed to execute the T4 template programmatically. I had the following options:

Options to execute a T4 text template programmatically:

  • Implement the ITextTemplating interface.
  • Use the TextTransform command line utility.