T4 not working in Visual Studio 2008

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

I tried toggling the Show All Files option, restart visual studio (multiple times), add new files .tt

(with the same result), tried it in both C # and VB.NET project and Google prepares spaces.

Is it possible for T4 text templates to be disabled in some way? If so, how can I get them back, this is annoying :-).?

+1


source to share


4 answers


Check if the CustomTool property on machine 2 is TextTemplateFileGenerator.



If this property is empty, the tool will not run to create the cs file.

0


source


This property is empty on machine 2 and is entered manually and saving it does not cause the cs file to be generated. Is it almost as if this tool was not working correctly on the second machine?



I do not currently have access to machine 1 (they are shared between my home and office), so I cannot compare stuff = (

0


source


I assume T4 is not installed for express versions of Visual Studio 2008. Are both machines running the same version?

0


source


I couldn't get it to work in a normal web project. When I added the library project and moved my templates directory there, the generation started automatically and I also had a "Run Custom Tool" on the right side of the screen. I think there was no separation anyway.

0


source







All Articles