The newly released Visualization and Modeling SDK for Visual Studio 2010 includes support for integrating T4 with msbuild. (yay!)
The ever-diligent Oleg Sych has the full skinny here.