-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Open
Labels
area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-minimal-hosting
Milestone
Description
Is there a way to modify the startup assemblies using the minimal hosting model?
In ASP.NET Core 5 I would say the following (where hostBuilder
is an instance of IWebHostBuilder
):
hostBuilder.UseSetting(WebHostDefaults.HostingStartupAssembliesKey, string.Join(";", assemblies));
With the new minimal hosting model I tried saying:
builder.WebHost.UseSetting(WebHostDefaults.HostingStartupAssembliesKey, string.Join(";", assemblies));
However this throws a NotSupportedException
and that I should use WebApplication.CreateBuilder(WebApplicationOptions)
instead, but I can't see an option to specify the hosting startup assemblies.
Mafii
Metadata
Metadata
Assignees
Labels
area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-minimal-hosting