Visual-studio – T4 not working in Visual Studio 2008

t4visual studio

I have two machines setup to run Visual Studio 2008 (SP1) & NET Framework 3.5 (SP1). If I create a .tt file in a console appliaction on machine #1 it automatically creates the sub .cs file for me, however if I do the exact same on machine #2 then no sub .cs file is created.

I have tried toggling the "Show All Files" option, restarting visual studio (multiple times), added new .tt files (with the same outcome), tried it in both a C# and a VB.NET project and Google is drawing up blanks.

Is it possible for T4 text templates to have been disabled somehow? If so, then how the heck do I turn them back on, it's annoying :-).?

Best Answer

Check if the file property CustomTool on machine 2 is TextTemplateFileGenerator.

If this property is empty no tool will be run to generate the cs file.