A plugin framework with ASP.NET MVC3 and embedded Razor views

前端 未结 6 546
小鲜肉
小鲜肉 2020-12-12 17:32

I\'m designing a plugin framework for ASP.NET MVC3 using Razor views, and I\'m having an issue getting the embedded views to work correctly.

The plugin frame

6条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-12 18:20

    David Ebbo recently blogged about precompiling Razor views into assemblies. You can view the post here.

    You should be able to avoid registering the assemblies directly by dynamically loading the assemblies (I would typically use my IoC container for this) and then calling BuildManager.AddReferencedAssembly for each plugin assembly.

提交回复
热议问题