有谁知道是否可以在 VS2010 内从另一个 T4 模板运行 T4 模板文件
谢谢
最佳答案
是的,可以。我就是这样做的:
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);
关于visual-studio-2010 - 从其他 T4 模板运行 T4 模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3636094/