Quantcast
Channel: MSbuild up-to-date check for generated files does not work as needed - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by Jonathan Dodds for MSbuild up-to-date check for generated files does not work as needed

$
0
0

I suspect the issue is that you are not supporting incremental generation. Your TextTemplateTransform target doesn't have inputs and outputs for the T4 files and the generated files, respectively.

Assuming that @(TextTemplate) is a collection of .tt files and that there is a one-to-one relation of .tt to .generated.cs, then modify the target definition as follows:

<Target Name="TextTemplateTransform" BeforeTargets="BeforeBuild"  Inputs="@(TextTemplate)"  Outputs="@(TextTemplate->'%(Filename).generated.cs')">

Is this a Windows specific build? You may want to consider using the Modeling SDK's text transformation targets file instead of writing and maintaining your own TextTemplateTransform target. See "Invoke text transformation in the build process".


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>