Kevin Le - Khnle
Kevin Le - Khnle

Reputation: 10857

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

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 for a better way.

Upvotes: 1

Views: 120

Answers (1)

stoic
stoic

Reputation: 4830

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

Upvotes: 1

Related Questions