Add an overload for IWebHostBuilder.Configure that takes in AssemblyName #14183
Labels
area-hosting
Includes Hosting
area-mvc
Includes: MVC, Actions and Controllers, Localization, CORS, most templates
area-networking
Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Is your feature request related to a problem? Please describe.
I am trying to create an internal library-based framework for authoring "hosted" apps, including ASP.NET apps. As such, I am not relying on the Startup class approach and instead I am following your guidelines for Startup-less configuration.
The problem comes if this configuration is split across several assemblies. In my case, there would be a "top-most" assembly with controllers and views, which would depend on other assemblies that are responsible for configuring ASP.NET. Turns out that routing does not work properly if IWebHostBuilder.Configure is called from other assembly (that does not contain controllers and actions).
Describe the solution you'd like
Ideally, it would be really nice if there was a mechanism to clearly provide all controller and action (and possibly other endpoint) "sources" as part of configuration process, perhaps as an overload of
IWebHostBuilder.Configure
accepting either a single AssemblyName as a string, or better yet an params? array of assembly names that should be looked in for relevant types (controllers, etc.).The text was updated successfully, but these errors were encountered: