Why is the "Transform all T4 Templates" not executing?
Asked Answered
C

0

7

I have a solution with three .NET Core 2 projects. Inside of every project I have several .tt T4 Templates.

I was searching for a smart way to transform all templates at once and found the Transform All Templates-Command.

Unfortunately the command does nothing. If I execute it in my solution, the output says:

Transforming templates for all project items.
-------------------------------------
-------------------------------------
Text templating transformation complete.

But after I check my templates, they did not update. If I go to one template file and save it, it always transforms, but only this template. I have 20 templates and do not want to go to every file seperately.

Any ideas, why the command does not work?

Cere answered 13/2, 2018 at 13:21 Comment(6)
How are you updating those templates? They should recompile automatically each time you update through Visual StudioCassondracassoulet
The templates are consuming a .json File, that changes sometimes. Almost all my models depend of this .json file. If I change the .json I want all templates to re-process...Cere
I'm suffering the same thing on a dotnetcore 2.0 project: I have 4 tt's spread over 3 projects, which generate fine when changing the tt, or right-clicking, but not when invoking "Transform All Templates"Puppis
T4Executer does this. You can specify to run all templates before or after building your solution.Aril
@Epsilekt this question is about the "Transform All Templates" Command, not about paying the payload compiling them on every build. David, did you ever found a solution? I have some T4 templates in classic .net and some templates in .net standard. The classic ones are compiled. The .net standard ones aren't compiled (except explicit save).Abet
@ChristianGollhardt I understand, but that extension has a quick 'run all templates' icon on the solution explorer menu, if he keeps having this issue it could be a alternative untill this is resolved.Aril

© 2022 - 2024 — McMap. All rights reserved.