Get Visual Studio to run a T4 Template on every build

后端 未结 22 2761
余生分开走
余生分开走 2020-11-22 08:29

How do I get a T4 template to generate its output on every build? As it is now, it only regenerates it when I make a change to the template.

I have found other ques

22条回答
  •  故里飘歌
    2020-11-22 08:56

    I agree with GarethJ - in VS2010 it is much easier to regenerate tt templates on each build. Oleg Sych's blog describes how to do it. In short:

    1. Install Visual Studio SDK
    2. Install Visual Studio 2010 Modeling and Visualization SDK
    3. Open in text editor project file and add to the end of file but before

    That's it. Open your project. On each build all *.tt templates will be reprocessed

    
    
    
    
        true
    
    
    

提交回复
热议问题