Currently we use plugins with razorgenerator. This works ok, but when the view needs to be editted it needs to be compiled every time. This makes us less productive then wanted. I was working on a custom razor viewengine to solve this. To get it working I need to set the view for the area's to a local directory.
I tried
public class PluginRazorViewEngine : RazorViewEngine
{
public PluginRazorViewEngine()
{
var x = this.AreaViewLocationFormats.ToList();
x.Insert(0, "C:/XXXXX/Areas/Module/Views/{1}/{0}.cshtml");
this.AreaViewLocationFormats = x.ToArray();
}
}
Though this gives the error:
The relative virtual path 'C:/XXXXX/Areas/Module/Views/Items/Index.cshtml' is not allowed here.
Is it possible to set the viewpath outside of the project?