I'm following Justin Slattery's Plugin Architecture tutorial and trying to adapt it for Razor, instead of WebForm Views.
Everything else (controllers, plugin assembly loading, etc) seems to be okay. However, I'm not able to get embedded Razor views to work properly. When I try to browse to the "HelloWorld/Index", I get the following error:
The view at '~/Plugins/MyProjectPlugin.dll/MyProjectPlugin.Views.HelloWorld.Index.cshtml' must derive from WebViewPage or WebViewPage<TModel>.
The exception is thrown by System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +262
I can include the complete stack trace, if needed.
Can anyone advise as to what I might be doing wrong?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…