Environment Variable for running in Electron #354

Open
opened 2026-01-29 16:37:22 +00:00 by claunia · 0 comments
Owner

Originally created by @robertmclaws on GitHub (Jul 7, 2019).

Originally assigned to: @GregorBiswanger on GitHub.

Is there currently a safe way to detect whether or not an app is running in Electron? If not, would it be possible for you folks to be able to compile in an environment variable (like "IS_ELECTRON") when a .NET app is running under Electron.NET? Right no I'm having to make my users add it manually, but it would be nice if I could detect it automatically.

Thanks!

Originally created by @robertmclaws on GitHub (Jul 7, 2019). Originally assigned to: @GregorBiswanger on GitHub. Is there currently a safe way to detect whether or not an app is running in Electron? If not, would it be possible for you folks to be able to compile in an environment variable (like "IS_ELECTRON") when a .NET app is running under Electron.NET? Right no I'm having to [make my users add it manually](https://github.com/CloudNimble/ElectronNET.Blazor#installation-instructions), but it would be nice if I could detect it automatically. Thanks!
claunia added the Feature label 2026-01-29 16:37:22 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#354