In my project in my main web assembly before I register routes in global.asax I load a number of external assemblies. Some of these assemblies have MVC Controllers and views inside of them.
My problem is that these external controllers are not picked up for some reason, I assume that controller registration happens somewhere before my assemblies are loaded, because if I reference my assemblies before application starts(dlls in bin folder) everything works fine.
So I'm wondering if there`s
- a way to control when mvc controllers are registered, so I can do it after all my assemblies are loaded? OR
- a way to inject my external controllers?
I had a similar issue with WebAPI controllers before and I was able to fix it by using my custom HttpControllerSelector
, but I wasn't able to find anything similar in MVC yet.