views:

20

answers:

1

Is there any attribute or other method of getting T4 to skip trying to transform custom methods?

Where it shows a warning saying T4MVC.tt doesn't support MyController.Method because it doesn't return a supported ActionResult type?

For example:

On a BaseController having this method:

public UrlHelper GetUrlHelper()
{
    return new UrlHelper(this.ControllerContext.RequestContext);
}
+1  A: 

Ah yes, I assume you're the one who asked during the MvcConf talk :)

I think we should just change T4MVC to just get rid of this warning, which probably does more harm than good. Can you try getting rid of it in t4mvc.tt? Should be around line 776 in the latest build.

I can just make that change and it will go in the next drop (2.6.22), but please let me know if that works well for you. Thanks!

David Ebbo
It was line 665-669, removed and it worked a treat. Thanks.
TreeUK