mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-13 13:44:57 +00:00
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.
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user