I've been using T4MVC for some time now and love the "explicit HtmlHelpers for rendering partials" feature, which by default is switched off. I am using T4MVC version 2.6.40.
I recently upgraded to MVC3 and noticed that no explicit HtmlHelpers are generated for Razor partials, so I looked at the source code of the T4MVC text template and found a method named "GetPartials" which has a line of code as folows:
var parts = GetControllers()
.Select(m => m.ViewsFolder)
.SelectMany(m => m.Views)
.Where(m => m.Value.EndsWith(".ascx"));
So it is clear that Razor views are not supported.
I'd also like to mention that when running the T4 template (right-click > run custom tool) I get a compiler warning stating: "The C# 2.0 and C# 3.5 compilers are no longer supported. Templates will always be compiled with the version 4 compiler instead of 'v3.5' as specified."
This relates to line 18 where the template language attribute has a value of "C#v3.5". Why does it have to have an explicit version dependency? Can it not just be "C#"?
Apologies for asking two seperate questions in one post.