views:

137

answers:

1

I download the latest version of Subsonic(3.0.0.3) but when I add the T4 templates in my solution in Visual studio 2008 SP1, the auto-generation don't work. If I right click on the template files also the "Run custom tools" is not present. What I have to do to make visual studio able to generate code from T4 templates?

+3  A: 

Check what type of project you are using.

T4 Templates don't run in "Web Site" projects (as opposed to "Web application" projects). If you're using a web site project, you must add a Code project as well, put your templates in there and reference that project in your website.

GC