From aa98b85f18016c5e78e2ed1d69e4e89dbfbcd60f Mon Sep 17 00:00:00 2001 From: tadic-luka Date: Tue, 22 Oct 2019 10:48:55 +0200 Subject: [PATCH] Update README.md EnableEndpointRouting should be set to false. Otherwise people will get error: Application startup exception: System.InvalidOperationException: Endpoint Routing does not support 'IApplicationBuilder.UseMvc(...)'. To use 'IApplicationBuilder.UseMvc' set 'MvcOptions.EnableEndpointRouting = false' inside 'ConfigureServices(...). The solution is even proposed in stack trace. Issue was opened on https://github.com/aspnet/AspNetCore/issues/9542 and it is explained there what should be done. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index a905b07b..f04b9a1b 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,11 @@ public static IWebHost BuildWebHost(string[] args) Open the Electron Window in the Startup.cs file: ```csharp +public void ConfigureServices(IServiceCollection services) +{ + services.AddMvc(option => option.EnableEndpointRouting = false); +} + public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment())