You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
If you have an external assembly, contianing a Controller, and a ViewComponent, you can register the controller with MVC by calling AddControllersAsServices()
However there is no equivalent for the ViewComponent.
The default behaviour seems to be if you have a project reference to the assembly then the VC is picked up, but if you don't have a project reference to it (i.e ILibraryManager is not aware of it) - because for example, it's a standalone "plugin" assembly, then VC's are not detected.
Could you add a method similar to AddControllersAsServices() but for VC's?
Or perhaps consider adding some sort of "IncludeMvcServicesFromAssemblies()` method, that will make sure the assemblies are treated as candidates for all types of services that MVC looks for - i.e Controllers, VC's, and whatever else.