ConfigureWebHost used with WebApplicationBuilder.Host (ASP0008)
Key dotnet.api.configurewebhost-on-builder-host · Severity error · Category api
ASP.NET Core analyzer ASP0008. Flags ConfigureWebHost called on WebApplicationBuilder.Host, which throws at startup; builder.WebHost is the supported way.
Incorrect
Section titled “Incorrect”builder.Host.ConfigureWebHost(web => web.UseUrls("http://*:8080"));Correct
Section titled “Correct”builder.WebHost.UseUrls("http://*:8080");