I've been using T4 to do some code generation in Visual Studio 2008. I shot a 4-part screencast series that describes the entire process.
In the videos, I talk about two open source projects, both available on CodePlex.
The T4 Toolbox is available at
www.codeplex.com/t4toolbox.
XmlGen# is available at
www.codeplex.com/xmlgensharp.
VideosPart 1 - Creating XML Data Bindings using XmlGen#Part 2 - The XML data file and T4 code generation harnessPart 3 - The T4 templatePart 4 - Using TemplateEx to manage whitespace