T4 Text Template Directives
Updated: March 2011
Directives provide instructions to the text template transformation engine.
The syntax of directives is as follows:
<#@ DirectiveName [AttributeName = "AttributeValue"] ... #>
All attribute values must be surrounded by double quotation marks. If the value itself contains quotation marks, they must be escaped with the \ character.
Directives are typically the first elements in a template file or an included file. You should not place them inside a code block <#...#>, nor after a class feature block <#+...#>.
In addition, you can create your own directives. For more information, see Creating Custom Text Template Directive Processors. If you use the Visualization and Modeling SDK to create a domain-specific language (DSL), a directive processor will be generated as part of your DSL.
|
Date |
History |
Reason |
|---|---|---|
|
March 2011 |
Split content into child topics. |
Information enhancement. |
|
June 2010 |
Use $(SolutionDir) in assembly directive. In preprocessed templates, use project references instead. Added <#@Parameter#>. Added notes on inherits, and building an assembly that you refer to in a template. |
Customer feedback. |