从其他 T4 模板运行 T4 模板

2023-11-25

有谁知道是否可以在 VS2010 内从另一个 T4 模板运行 T4 模板文件

Thank


是的你可以。这就是我正在做的:

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); 
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

从其他 T4 模板运行 T4 模板 的相关文章

随机推荐