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
In Visual Studio 2017 (probably next versions too), you should add this in Pre-build event:
"$(DevEnvDir)TextTransform.exe" -out "$(ProjectDir)YourTemplate.cs" "$(ProjectDir)YourTemplate.tt"
p.s. Change path to your template if it's located not in root project directory.