I have a VS project that contains:
a pre-build action running TextTransform
on a template.tt
to generate generated.cs
generated.cs
listed as one of the files to compile (i.e. in the list of project files)
When I build the project, the pre-build action is executed, generated.cs
is re-created, but VS compiles the previous version of generated.cs
(which I guess it loaded in memory when the build process started).
How to make the build use the new version of generated.cs
(i.e. the one generated in the pre-build action)? How to force the build order?
Note that the text transformation input is dynamic and hence cannot be done in design time.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…