Applications created with Electron.NET does not launch after a build
See original GitHub issueHello
I start with Electron.net and I have a little problem with:
To explain, I will take example on the demo of Electron.net provided on github: Electron.NET API Demos.
- I download the zip of the demo and unzip it
- I go to the directory that contains the necessary files for launching and compilation.
- I type the commands in a terminal:
- dotnet restore
- dotnet electronize start
Here, no problem, the window launches very well.
Now, I want to build to have a final executable. To do this, I run the command:
dotnet electronize build /target win
The build command goes very well too, the files are generated.
The trouble is that if I run the executable, I have this:
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] User profile is available. Using ‘C:\Users\Whiskey\AppData\Local\ASP.NET\DataProtection-Keys’ as key repository and Windows DPAPI to encrypt keys at rest. Hosting environment: Production Content root path: F:\Dev\CNet\electron.net-api-demos-master\electron.net-api-demos-master\ElectronNET-API-Demos\obj\desktop\win\bin Now listening on: http://localhost:5000 Application started. Press Ctrl+C to shut down.
Then nothing, the window is not displayed.
Did I miss something ?
PS: I am on Windows 10, with node v10.4.1 and last dotnet core installed.
Thanks, Regards,
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:10
Top GitHub Comments
Hello
Launch the command:
dotnet electronize build /target linux
Normally, it should pass.
If your application does not run, try creating a bash script with the executable electron (created using the command above) and main.js. I do not have linux on my machine, so I can not say exactly where the executable electron is, but it must be somewhere in this directory:
./node_modules/electron/dist/electron
Regards.
Good I advance on my problem. To launch it I have an alternative that works but I would have preferred an executable.
In the home directory (where the main.js file is), I created a script:
.\node_modules\electron\dist\electron main.js
Once the script is launched, the window appears well. Not very practical compared to an executable but it works.
Regards.