Get Visual Studio to run a T4 Template on every build

后端 未结 22 2810
余生分开走
余生分开走 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 09:22

    Dynamo.AutoTT will do what you need. You can configure it to watch files via a regex or generate on build. It also allows you to specify which T4 templates you want it to trigger.

    You can download it from here : https://github.com/MartinF/Dynamo.AutoTT

    Just build it, copy the dll and AddIn files into

    C:\Users\Documents\Visual Studio 2012\Addins\

    and away you go.

    If you want to get it going in VS2012 you will need to modify the a Dynamo.AutoTT.AddIn file and set the Version to 11.0 inside the AddIn file;

提交回复
热议问题