How do you put views and content in a separate assembly that can be referenced from a MvcApplication?
Reference assemblies are a special type of assembly that contain only the minimum amount of metadata required to represent the library's public API surface.
NET-based applications. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. Assemblies take the form of executable (.exe) or dynamic link library (. dll) files, and are the building blocks of . NET applications.
It sounds like you're talking about portable areas. Craig Shoemaker's Polymorphic Podcast had a recent episode featuring Jeffrey Palermo and Eric Hexter, and they discussed portable areas and what they are.
A link to an article at Los Techies appeared in the show notes, which is a great 'how-to' for getting started with working with portable areas.
The short answer is that you need to compile a project with the proper dependencies, and set the build action on all views as embedded resources.
AFAIK, there isn't a straight forward way using webforms (.aspx) as the view. However you can use other view engines (for example Stringtemplate) and embed the pages and images as resources into the dll. You will need to implement:
Hope it makes sense...
quite simple, when you handle your routing -> route it to the assembly and class that handles this.
but don't forget you have to implement a few things there. i assume you got this figured out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With