T4 Output Directive
In Visual Studio text templates, the output directive is used to define the file name extension and encoding of the transformed file.
For example, if your Visual Studio project includes a template file named MyTemplate.tt which contains the following directive:
then Visual Studio will generate a file named MyTemplate.cs
The output directive is not required in a run-time (preprocessed) text template. Instead, your application obtains the generated string by calling TextTransform(). For more information, see Run-Time Text Generation with T4 Text Templates.
<#@ output extension=".fileNameExtension" [encoding="encoding"] #>
There should be no more than one output directive in each text template.