Ok, the big guns are pitching in now 🙂
Hot on the heels of the tooling for LINQ-to-Entities folks adopting T4 for their next release, comes another.
Scott Guthrie just blogged about a new RC of ASP.Net MVC that will shortly be coming along. It’s a long post, but down in the section on view templates in the scaffolding system, he mentions that they use T4 as a one-time generation technology to set these up based on your data.
Of course, this means that the generation is fully customizable.
I’m seeing the beginnings of a trend where product groups are finding they can get often-requested features for code generation customization by going the T4 route rather than hardcoding CodeDOM trees or some other tough to modify solution.
All isn’t perfect, as of course this type of customizatio tends to require comparison of product and user templates when new versions of things come out. See Oleg’s excellent encapsulation techniques (Nested Template Class especially) for ways to mitigate that.