Author: Angle Bracket Percent : ASP.NET | Posted on: 3/12/2010 2:18:40 PM | Views : 1171

T4MVC has always struggled with finding the right way of running automatically when you build.  Being a T4 template in your project, by default it just runs when you save it.  This is not great, because you really want it to rerun whenever you make a change that affects it: e.g. new controller action, new static file, . So I had come up with a pretty crazy workaround (the AlwaysKeepTemplateDirty flag), described in details in this previous post (under " The T4 file automatically runs whenever you build ").  It's a pretty hacky technique, which mostly works but has some nasty quirks: You need to open and save it once to start the save 'cycle' You need to leave it open It's always marked as dirty, which is an annoyance.  The...(read more) ...

Go to the complete details ...