.NET 2.2 => NET 5.0 – Endpoint Routing does not support ‘IApplicationBuilder.UseMvc(…)
Solution Use “endpoint” routing Old app.ConfigureExceptionHandler(loggerFactory); app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseSpaStaticFiles(); app.UseAuthentication(); app.UseCors(“CorsPolicy”); app.UseMvc(routes => { routes.MapRoute( name: “default”, template: “{controller}/{action=Index}/{id?}”); }); New app.ConfigureExceptionHandler(loggerFactory); app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseSpaStaticFiles(); app.UseRouting(); app.UseCors(“CorsPolicy”); app.UseAuthentication(); app.UseEndpoints(endpoints => {