Running T4 templates from other T4 template
问题 does anyone know if it's possible to run T4 template file from another T4 template, inside VS2010 Thank 回答1: 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); 回答2: What your probably looking for is http://t4toolbox.codeplex.com/ t4