You can change the assembly where WebHostBuilder will look for the startup type.
Add the INI configuration file named Microsoft.AspNet.Hosting.ini to the wwwroot folder with the following contents:
[Hosting] Application = App.Bootstrapper
Where App.Bootstrapper is the namespace of your application's bootstrap project.
The startup class should look the same, for example with ConfigureServices and Configure :
public class Startup { public void ConfigureServices(IServiceCollection services) {
If you're interested, you can see the logic for determining the type of launch here . If we specify the Hosting:Application key in the INI file, it will use this value instead of appEnvironment.ApplicationName .
source share