I have an MVC application with custom view engine implementing theme selection, i.e. dynamic setting of views' master pages. The app structure is described here The issue is that master pages exist out of their default location in Views folder. (That is because I want all theme-related files, ie. css and images to be at one place together with master. Putting css into Views would break security issue - default views' web.config won't allow to access anything there and I'd rather keep it that way.) Everything works fine until I try to change master page to be strongly typed, ie specify
<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage<MyApp.Models.BaseModel>" %>
Then the page throws error:
Could not load System.Web.Mvc.ViewMasterPage < MyApp.Models.BaseModel >
.
So, is there any way to import that namespace to where it's required? To change some setting in web.config (in Views folder, I assume) or elsewhere?