There are quite a few improvements added to Visual Studio’s T4 system for Visual Studio 2012. The highlights include MEF support for deploying directive processors and easier debugging.
T4 is Visual Studio’s built-in code generator. Though fundamental for many of the frameworks built atop .NET, it is incredibly under-powered. Even the simplest things like intelligently reusing templates or emitting multiple files seem beyond it at first glance. Yet developers such as Damien Guard are finding of ways to improve it.