How can I remove the VB Razor Engine or configure the RazorViewEngine to not use and look for .vbhtml files on disk? For new ASP.NET MVC 3 Razor projects, I always remove th
I figured I'd merge the examples from @tugberk and @Dimps:
public class CSHtmlRazorViewEngine : RazorViewEngine {
public CSHtmlRazorViewEngine()
: base() {
this.AreaMasterLocationFormats = Filter(base.AreaMasterLocationFormats);
this.AreaPartialViewLocationFormats = Filter(base.AreaPartialViewLocationFormats);
this.AreaViewLocationFormats = Filter(base.AreaViewLocationFormats);
this.FileExtensions = Filter(base.FileExtensions);
this.MasterLocationFormats = Filter(base.MasterLocationFormats);
this.PartialViewLocationFormats = Filter(base.PartialViewLocationFormats);
this.ViewLocationFormats = Filter(base.ViewLocationFormats);
}
private static string[] Filter(
string[] source) {
return source.Where(
s =>
s.Contains("cshtml")).ToArray();
}
}