mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
Applications created with Electron.NET does not launch after a build #187
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 @ABWhiskey on GitHub (Jun 19, 2018).
Hello
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.
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 winThe build command goes very well too, the files are generated.
The trouble is that if I run the executable, I have this:
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,
@kwakuduahc1 commented on GitHub (Jun 22, 2018):
Can you share the code or develop a simple sample that produces the problem. If I have been doing my correctly, your output should not show at all.
@ABWhiskey commented on GitHub (Jun 22, 2018):
Hello
As requested, in attached part, a minimal project for Electron.NET. I have cleaned up the project a bit so I can post it here but it remains functional.
In the folder that contains the Program.cs file, just type:
dotnet restoredotnet electronize startI followed this tutorial to make the skeleton of the application : https://www.youtube.com/watch?v=nuM6AojRFHk
The problem is that with the start command, the program works. But when I publish it and run the executable, this is a problem, the window is not displayed.
Thanks,
Regards.
ElectronNETBase.zip
@kwakuduahc1 commented on GitHub (Jun 22, 2018):
I run this
dotnet electronize build /target win7-x86and everything seems to work fine. Use the code for your publishing or refer to publishing targets in the documentation
@ABWhiskey commented on GitHub (Jun 22, 2018):
I just tested your command line. It builds well, I have the executable but the same problem, it stops after "Application Started, Press Ctrl + C to shutdown", and of course, no window appears. :(
I feel that the bridgeconnector does not work.
@ABWhiskey commented on GitHub (Jun 24, 2018):
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.jsOnce the script is launched, the window appears well. Not very practical compared to an executable but it works.
Regards.
@tiyero commented on GitHub (Jun 28, 2018):
Hello
I build Linux.Please,How to run on Centos7,Thank You.
@ABWhiskey commented on GitHub (Jun 28, 2018):
Hello
Launch the command:
dotnet electronize build /target linuxNormally, 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/electronRegards.
@EldinZenderink commented on GitHub (Jul 17, 2018):
I had the same issue where the bloody thing just wouldnt run on Ubuntu (not sure if it's closely related, as I am a linux noob). But by doing
chmod -R u+x .in the directory where the executable is located, it worked for me. Apparently some files do not have the right permissions set after building with target /linux.This is again not a real solution but for testing this works fine for me.
Edit: I was compiling on a windows machine, hence apparently some permissions are not copied across different machines according to this form: https://unix.stackexchange.com/questions/338680/executable-file-problem-after-transfer-to-other-system
So, this might not apply for you.
Quit interesting.
@jadhavrani123 commented on GitHub (Feb 29, 2020):
I want to store my ElectronNet exe in system tray at the time of PC shutdown
@jadhavrani123 commented on GitHub (Mar 9, 2020):
Sir I want to close my developer tool on click cntrl + shift + I
WebPreferences = new WebPreferences
{
DevTools = false
}
I am use this code........but it not work for me