Recent blog posts about T4
I came across several blog posts about T4 code generation you may find useful.
Sanjay Nagamangalam posted a T4 script for generating Entity Framework Views.
Damien Guard posted a T4 template for generating LINQ to SQL DataContext class in C# for all tables in a given SQL Server database.
New Age Solutions posted a T4 template for generating WiX source file that will install all files in a given directory. Make sure to read Rob Mensching comments at the bottom of the page about impact of regenerating component GUID values on installer’s ability to perform patches and upgrades.



After long struggle fixed the issue identified by Rob. Now t4 template takes into account previously generated component guid. I tested doing major upgrades and it works!