No, I'm afraid not. There is currently no in-the-box integration between MsBuild and T4. If you change x.ttinclude, you have to manually force a re-transform of main.tt (by clicking on the "Transform All" icon in the Solution Explorer, by right-clicking on main.tt in the Solution Explorer and selecting "Run custom tool", or by saving main.tt).
As a workaround, you could call the TextTransform.exe command line tool from a pre-build event in your project.
There are various extensions / toolkits for T4 out there that have be developed by third parties; it might be worth searching for those to see if they provide a better experience in this area. We do have a sample of T4 build tasks in the pipeline that provide better integration (e.g. transform all on build, warning about out of date files, transform out of date files), but I can't say if/when it will see the light of day. I'll post an update when I know more.
Regards, Duncan - Marked As Answer byDuncanPMSFT, ModeratorSaturday, June 27, 2009 9:38 AM
-
|