T4 stands for "Text Template Transformation Toolkit" and, simply put, is code generation inside Visual Studio. It's very easy to work with if you're familiar with scripting ASP.NET pages - except that it works with a syntax rather than . Another thing to remember is that you're working with Visual Studio - not your project. The templates run in a completely different AppDomain - so you can't use your project's configuration without doing a little gymnastics. To get you started, I made a screencast - complete with some music from Rush:
= Troubleshooting =
Having trouble with your t4 templates? Have a look at the to see the most common causes.