App.OpenFile never called #922

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

Originally created by @Cedric-LE on GitHub (Dec 12, 2023).

Using electron net 23.6.1

.NET core 7.0.203 and node v16.20.2

  • Target: Windows 10

I want to perform an action when launching the application by double-clicking on a file from the explorer.
I've added a callback to the OpenFile event on the App to obtain the path to the file passed as an exe argument. The callback is never called.

I did something like that.

        ElectronNET.API.Electron.App.OpenFile +=  Console.WriteLine;

        // await window
        var window = await ElectronNET.API.Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions
        {
          Title = "My App",
          AutoHideMenuBar = true,
          Width = 1200,
          Height = 800,
        });


Originally created by @Cedric-LE on GitHub (Dec 12, 2023). <!-- Please search existing issues to avoid creating duplicates. --> <!-- Which version of Electron.NET CLI and API are you using? --> Using electron net 23.6.1 <!-- Which version of .NET Core and Node.js are you using (if applicable)? --> .NET core 7.0.203 and node v16.20.2 <!-- What target are you building for? --> * **Target**: Windows 10 I want to perform an action when launching the application by double-clicking on a file from the explorer. I've added a callback to the OpenFile event on the App to obtain the path to the file passed as an exe argument. The callback is never called. I did something like that. ``` ElectronNET.API.Electron.App.OpenFile += Console.WriteLine; // await window var window = await ElectronNET.API.Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Title = "My App", AutoHideMenuBar = true, Width = 1200, Height = 800, }); ```
claunia added the bug label 2026-01-29 16:52:01 +00:00
Author
Owner

@FlorianRappl commented on GitHub (Oct 31, 2025):

Outdated - use ElectronNET.Core and ElectronNET.Core.AspNet.

See Wiki / What's New.

@FlorianRappl commented on GitHub (Oct 31, 2025): Outdated - use `ElectronNET.Core` and `ElectronNET.Core.AspNet`. See [Wiki / What's New](https://github.com/ElectronNET/Electron.NET/wiki/What's-New).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#922