Product of build-time T4 transformation is used only in the next build

前端 未结 2 1353
迷失自我
迷失自我 2020-12-18 21:09

I have a VS project that contains:

  1. a pre-build action running TextTransform on a template.tt to generate generated.cs

2条回答
  •  执笔经年
    2020-12-18 21:32

    I don't think you need a custom pre-build action. Just add the ".tt" file to your project and set its "Custom Tool" property to "TextTemplatingFileGenerator". You might want to make sure that the *.generated.cs files are also added to the project, but I think that VS takes care of that.

提交回复
热议问题