How to use T4 to generate two files at the same time from one template?

后端 未结 1 1896
庸人自扰
庸人自扰 2021-02-13 03:52

I am having a case in which I need to generate two CSharp code files with pretty the same code but different namespace of the input and output types of the methods. In fact each

相关标签:
1条回答
  • 2021-02-13 04:27

    or you could use the T4 Toolbox (Old CodePlex project, New GitHub project) and use the helpers to generate multiple files.

    The author, Oleg Sych, has a documentary blog post (Archived version)

    Or if you don't want this dependency just for this functionality, you can use the T4 file MultiOutput.tt (Archived version)

    0 讨论(0)
提交回复
热议问题