I\'m using VisualStudio Ultimate 2012 (Update 1) on Windows 7. I can get my T4 template to generate a file by: right click [tt file] | run Custom tool. That works g
I'm afraid that you can't successfully run templates at build time that make use of the Host variable to get at IDE services like the DTE, as the msbuild T4 host is designed to work both from the command line as well as builds in the IDE, and as such, does not expose the global service provider or DTE to templates. The same is true from texttransform.exe, the simple command-line host.