It's also not possible to run two instances of the app simultaneously in ElectronNET.Core with AspNet #992

Closed
opened 2026-01-29 16:54:04 +00:00 by claunia · 1 comment
Owner

Originally created by @FrankBoehringerKirchner on GitHub (Nov 2, 2025).

  • ElectronNET.Core: 0.0.18
  • ElectronNET.Core.API: 0.0.18
  • ElectronNET.Core.AspNet: 0.0.18
  • dotnet: 8
  • nodejs: v22.19.0
  • Target: Windows

When publishing the electronNET app and running it twice (even with a pause between opening the app again and singleInstance turned off) another instance of the app doesn't open, but rather focuses the already open instance. Single Mode is turned off in the csproj:
Image
and when building the app, this is also reflected in the generated package.json.

The only log when you start the application again is:
Entry!!!:

I've also tried it with the unpackaged exe after a build to see if singleInstance mode is really turned off by changing the main.js to log the singleInstance variable it uses. And although it is turned off and the app has the exact same behaviour, I get more logs in the console:

Image

** Steps to Reproduce: **

  1. Create an app using ElectronNET.Core
  2. change singleInstance to false in the csproj as seen in the image
  3. publish the project
  4. open the generated exe once and wait for it to open
  5. open the generated exe again

PS: so happy to see this project progress :) Thanks for the awesome work!

Originally created by @FrankBoehringerKirchner on GitHub (Nov 2, 2025). * **ElectronNET.Core**: 0.0.18 * **ElectronNET.Core.API**: 0.0.18 * **ElectronNET.Core.AspNet**: 0.0.18 * **dotnet**: 8 * **nodejs**: v22.19.0 * **Target**: Windows When publishing the electronNET app and running it twice (even with a pause between opening the app again and singleInstance turned off) another instance of the app doesn't open, but rather focuses the already open instance. Single Mode is turned off in the csproj: <img width="395" height="48" alt="Image" src="https://github.com/user-attachments/assets/36791420-b17f-4223-aa95-82145d64bc8f" /> and when building the app, this is also reflected in the generated package.json. The only log when you start the application again is: `Entry!!!:` I've also tried it with the unpackaged exe after a build to see if singleInstance mode is really turned off by changing the main.js to log the singleInstance variable it uses. And although it is turned off and the app has the exact same behaviour, I get more logs in the console: <img width="1688" height="502" alt="Image" src="https://github.com/user-attachments/assets/6ac0b6b0-04ef-4065-b284-3ebe639cb095" /> ** Steps to Reproduce: ** 1. Create an app using ElectronNET.Core 2. change singleInstance to false in the csproj as seen in the image 3. publish the project 4. open the generated exe once and wait for it to open 5. open the generated exe again PS: so happy to see this project progress :) Thanks for the awesome work!
claunia added the bug label 2026-01-29 16:54:04 +00:00
Author
Owner

@FlorianRappl commented on GitHub (Nov 2, 2025):

Should be fixed in the most recent 0.1.0 preview.

Please try to provide a MWE that we can also verify on the same code. Listing the steps is good but a repository to try out a fix is always much better. Many thanks!

@FlorianRappl commented on GitHub (Nov 2, 2025): Should be fixed in the most recent 0.1.0 preview. Please try to provide a MWE that we can also verify on the same code. Listing the steps is good but a repository to try out a fix is always much better. Many thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#992