Microsoft.TextTemplating.targets and FastUpToDate #9477
Labels
Feature-Up-to-date
Build up-to-date check that avoids shelling out to MSBuild unless necessary.
Triage-Investigate
Reviewed and investigation needed by dev team
The Microsoft.TextTemplating.targets will run t4 transformations on any .tt files in your project on build.
https://learn.microsoft.com/en-us/visualstudio/modeling/code-generation-in-a-build-process?view=vs-2022&tabs=csharp
However if a .tt file (and nothing else) is changed then FastUpToDate will prevent a rebuild (and thus prevent the t4 transform from rerunning).
Ideally Microsoft.TextTemplating.targets will add .tt files and their outputs to the appropriate UpToDate item groups.
I tried to work around this with
However that doesn't work if you have more than one .tt file you end up with a warning like the below and the build runs everytime.
The text was updated successfully, but these errors were encountered: