Can I compile an Area and use the dll as a module for multiple sites?
I am trying to find out if I am thinking about this correctly. My goal is to be drop in a dll and have access to helpers, and partial views (Maybe Views too), using an MVC pattern. I have been treating Areas as modules lately using @RenderAction to serve me up some partials when I need them anywhere on a site. I can copy that whole area out and reuse it on another site, but that means changing namespaces on each file and it's duplication of the area so I开发者_JS百科 am not getting to update it in one place for all sites. I am open to ideas and thoughts if I am approaching this incorrectly. For clarity's sake, here is my question: Is there a way to isolate only an area and compile it in it's own assembly? If so why is there not a new project type for that? Like add->new->module?
Thanks
You may checkout the following article which illustrates a nice technique allowing you to embed razor views into a separate assembly as embedded resources.
精彩评论