I have a problem with external razor views. In my project I have main mvc web assembly and dynamically loaded external class library assemblies(from DB) with their own Controlle
Try use the using directive in your Views in the dynamic assembly.
@using MyNamespace.MyPlugin.Models;
@using MyNamespace.MyPlugin;
etc
I was able to precompile views with RazorGenerator Visual Studio extension (not RazorGenerator.Mvc
one) in my assemblies.
It basically converts .cshtml
razor views into .cs
files with WebViewPage
classes before assemblies compile.
And in my web project I had to implement my own VirtualPathProviderViewEngine
similar to this one