Hi there,
does anyone know if it's possible to run T4 template file from another T4 template, inside VS2010
Thank
Hi there,
does anyone know if it's possible to run T4 template file from another T4 template, inside VS2010
Thank
Yes, you can. This is how I'm doing it:
string templateText = File.ReadAllText(Host.ResolvePath(templateFileName));
Engine engine = new Engine();
string output = engine.ProcessTemplate(templateText, Host);
//this is optional - record all output to your file of choice:
File.WriteAllText(outputFilePath, output);