This technique is originaly used by StuartLeeks ModularVNext to achieve modular approach in ASP.net5.I have just ported the project ModularVNext to latest beta8 of ASP.net5.
This is main web app where all modules will be plugged. There is a copy task in gulp.js file that copies all the modules DLLs in the folder "ModularAsp5-Beta8\artifacts\bin\ModulesDLLs" (path from where main web app reads its modules) when we build main web app.
A pluggable module
A pluggable module
- Every module has its controller and views
- Main web app has its own controller and views
- Download the zip file
- Open ModularAsp5-Beta8.sln in Visual Studio 2015
- Build all the modules first i.e ModuleOne and ModuleTwo
- Build main web app i.e ModularAsp5-Beta8
- Now run main web app by clicking on "IIS Express" button
- Trigger "YourUrl/ModuleOne" or "YourUrl/ModuleTwo" to open respective modules
- "YourUrl" will point to the "HomeController" in main web app