T4生成多文件时,不生成自己

如:我用的网上的生成多文件的一个include文件。
生成多文件时,默认会生成一个以自己名字命名的文件如:

有一个demo.tt文件,生成时会出来一个demo.cs文件(默认情况下)


解决方法: Found a trick
/hack! <#@ output extension="/" #> or <#@ output extension="\\" #> Visual Studio 2012 neither outputs the default file, nor complains about its inability too much. P.S. I've tried it with T4MultiFile NuGet package, but it should work with T4Toolbox too, I think.

 

posted @ 2017-08-09 11:02  小小高  阅读(290)  评论(0编辑  收藏  举报