From 4a2a4788c8e456b543d8b139fb3f6964acdc82d1 Mon Sep 17 00:00:00 2001 From: TeBeCo Date: Fri, 3 Nov 2017 18:31:01 +0100 Subject: [PATCH] Should never use async void, also .Start() and .RunSynchronoulsy() seems to deadlock --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ddd9190..1a5542f 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ public static IWebHost BuildWebHost(string[] args) Open the Electron Window in the Startup.cs file: ```csharp -public async void Configure(IApplicationBuilder app, IHostingEnvironment env) +public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { @@ -60,7 +60,7 @@ public async void Configure(IApplicationBuilder app, IHostingEnvironment env) }); // Open the Electron-Window here - await Electron.WindowManager.CreateWindowAsync(); + Task.Run(async () => await Electron.WindowManager.CreateWindowAsync()); } ```