This project has moved and is read-only. For the latest updates, please go here.

T4 generator in VS 2011

Nov 22, 2011 at 3:50 PM

Hi Stephen,

How was you able to use T4 in Visual Studio 2011?



Nov 22, 2011 at 8:32 PM

The source files are all shared between the Visual Studio versions I have (VS2010 Pro + Async CTP, VS2011 Express Dev Preview, and VS2011 Ultimate Dev Preview). I build in VS2010 for the non-preview platforms (everything except Metro and .NET 4.5), and then build Metro and .NET 4.5 versions in VS2011.

So, the .cs file is generated in VS2010, and then VS2011 can reference the .tt file (with the .cs file) and won't try to build it.

I just tried it out, and VS2011 appears to go into a infinite crash-restart loop if it does try to compile a .tt file.


Nov 23, 2011 at 5:19 AM

Got it. Thank you a lot.