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.

Information and Links

Join the fray by commenting, tracking what others have to say, or linking to it from your blog.


Other Posts
T4 template for generating SQL view from C# enumeration
Test runner for T4 unit tests

Write a Comment

Take a moment to comment and tell us what you think. Some basic HTML is allowed for formatting.

Reader Comments

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!