开发者

In an ASP.MVC app, how to define a View and bring it in from an assembly?

开发者 https://www.devze.com 2023-02-08 04:36 出处:网络
I am writing an ASP.MVC application that behaves as a host of future plug-ins that are yet to be written.These plugins will be packaged as DLL in separate assemblies.One of the things that a plugin is

I am writing an ASP.MVC application that behaves as a host of future plug-ins that are yet to be written. These plugins will be packaged as DLL in separate assemblies. One of the things that a plugin is responsible for is to provide its own View. Preferable that the main app will not have to be recompiled, each time a new plugin is written. What is the best way to have the main app looking for views that are in other assemblies?

UPDATE: My last resort is to to leverage the Post-Build events to copy View files to the View folder of the main app. But I am looking fo开发者_Python百科r a better way.


Have a look at the mvcms project which does exactly what you are trying to do.

0

精彩评论

暂无评论...
验证码 换一张
取 消