mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
Shutdown with blazorserver app leaves process running #444
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Jan 27, 2020).
Electron.NET Tools (7.30.2+022221307cd0119dadeefcfe35ef45242f870779)
.NET Core SDK (reflecting any global.json):
Version: 3.1.101
Commit: b377529961
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.15
OS Platform: Darwin
RID: osx.10.15-x64
node v12.11.1
Quitting the app leaves the process running.
In Program.cs
In Startup.cs
App opens in Electron window, look at all three pages then Electron>Quit Electron or CMD+Q
In the Activity Monitor app, search for shut and the ShutdownBlazorElectronNet process is still present and active.
After three starts:
@syedadeel2 commented on GitHub (Mar 2, 2020):
I had the same issue but fixed by changing "singleInstance": false to "singleInstance": true, in electron.manifest.json
@MarkBQE commented on GitHub (May 25, 2020):
This is still an issue on Mac, I am running Electron Net with Blazor server, changed the Single Instance to true as per Syed Adeel2 has no affect

@MarkBQE commented on GitHub (May 25, 2020):
Ok Fixed it. In the startup of Blazor server app please add the following code. what makes the .net process go away is Environment.Exit(0)
Electron.App.WindowAllClosed += () =>
{
Electron.App.Quit();
};