This post is an update to previous post: Code Generation Using Custom Item Template, Custom Template Wizard and T4 Engine
I changed the code to support Visual Studio 2010.
You can download latest version here.
Hope this helps.
Kirill