question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Applications created with Electron.NET does not launch after a build

See original GitHub issue

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.

  1. I download the zip of the demo and unzip it
  2. I go to the directory that contains the necessary files for launching and compilation.
  3. 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:10

github_iconTop GitHub Comments

1reaction
ABWhiskeycommented, Jun 28, 2018

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.

1reaction
ABWhiskeycommented, 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.js

Once the script is launched, the window appears well. Not very practical compared to an executable but it works.

Regards.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Electron app not launching
am working with angular version 6.1.0 and electron 2.0,on running the app in browser it but on running npm run electron-build was successful...
Read more >
Building Cross-Platform Desktop Apps with Electron.NET
First, open a terminal window and run the following commands to create a new project called Processes. mkdir Processes cd Processes dotnet new ......
Read more >
Create a desktop app with Electron, React and C# | ...
An Electron is a framework to create native desktop applications for Windows, MacOS, and Linux. And what is the wow part in it,...
Read more >
Bundling your React web to a desktop app with Electron
The goal is how to implement it in a quick and easy way. I'm mobile developer and using React Native, so learn C#,...
Read more >
Building Blazor Desktop Apps with Electron.NET
First, open a terminal window and run the following commands to create a new project called BlazorApp. mkdir BlazorApp cd BlazorApp dotnet new ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found