Hello,
I searched a lot for this but I could not find a simple way to do this. There is another thread with similar subject but I could not reply to that for asking this.
I'd create some multi-tenant app where I'd put the admin logic (controllers/views) to some shared external assembly and I could create a fully customized UI for each tenant (own web app for each customer with different db, UI, features).
Every example is set up as View located in the web app itself.
Now with latest MVC 6 Beta 8 I'm able to put the controllers to external assembly, routing finds the proper controller but it won't find the View.
I saw lots of workarounds but not a single direct solution for this:
- create an own NuGet package (this one seems the easiest way, however seems more complicated than simply using a class lib)
- compile Views as embedded resources
- customized RazorViewEngine and various hacks/workarounds, which possibly will break with MVC 6 and .NET Core
- using IViewLocationExpander (could not make any example actually working for pulling view from external assembly)
So how it is possible for simply specify the assembly in the controller or searching for a View in the same assembly where controller is located?