Msbuild 运行TextTransform.exe时,如何区分TextTemplatingFilePreprocessor和TextTemplatingFileGenerator?

Msbuild 运行TextTransform.exe时,如何区分TextTemplatingFilePreprocessor和TextTemplatingFileGenerator?,msbuild,t4,css,Msbuild,T4,Css,运行TextTransform.exe时,如何区分TextTemplatingFilePreprocessor和TextTemplatingFileGenerator? 我不能像大多数人所说的那样使用msbuild,所以我在寻找具体的东西:如何在命令行中为给定的TT文件运行TextTemplatingFilePreprocessor。 谢谢大家! TextTransform.exe不支持预处理。如果不能使用msbuild任务(请记住,可以使用msbuild standalone在其他进程中执行此

运行TextTransform.exe时,如何区分TextTemplatingFilePreprocessor和TextTemplatingFileGenerator? 我不能像大多数人所说的那样使用msbuild,所以我在寻找具体的东西:如何在命令行中为给定的TT文件运行TextTemplatingFilePreprocessor。
谢谢大家!

TextTransform.exe不支持预处理。如果不能使用msbuild任务(请记住,可以使用msbuild standalone在其他进程中执行此步骤),则可以编写自定义主机。MSDN上有一个样本,网址为

,谢谢。我创建了一个自定义主机,这可以正常工作,但这将导致TextTemplating为我的每个TT文件(嵌入为资源)构建程序集运行时。我更喜欢“预处理器”方法,因为它为我提供了与代码一起构建的最终类。