No equivalent of AddControllersAsServices() for VC's and TagHelpers #4087
Description
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.