Closed
Description
Today we throw in the following situations:
var builder = WebApplication.CreateBuilder(args);
builder.Host.ConfigureWebHost(builder =>
{
});
var builder = WebApplication.CreateBuilder(args);
// These should all fail with errors as well
builder.WebHost.UseStartup<Startup>();
builder.WebHost.UseStartup(typeof(Startup));
builder.WebHost.UseStartup("Startup");
builder.WebHost.UseStartup(context => new Startup());
var builder = WebApplication.CreateBuilder(args);
builder.WebHost.Configure(app =>
{
});
We should add an analyzer that detects these patterns that warns/fails and tells the user to configure the pipeline on WebApplication itself.