T4 templates can contain three types of content: literal text that will be copied directly to the output files, template directives which, just like a compiler directive, control how the
TextTemplatingFileGenerator creates the file, and C# or VB code contained in what T4 calls a CONTROL BLOCK.
T4 directives control how
TextTemplatingFileGenerator creates the output file. They are wrapped inside <#@ and #> characters. The attributes must be included in quotation marks. The full list of directives and their attributes is available on MSDN (search for “Writing a T4 Text Template”), but here are the ones we’ll be using: ...