I downloaded and installed the T4Toolbox to work with T4 templates more easily... however, I can't even figure out how to run the Generator
or CSharpTemplate
.
Here is an example file I created:
Template1.tt:
<#+
public class Template1 : CSharpTemplate
{
public override string TransformText()
{
base.TransformText();
#>
Hello world
<#+
return this.GenerationEnvironment.ToString();
}
}
#>
I have compiled my application and saved the file, yet no output file(s) are created. :/