Exception after dotnet electronize start #50

Closed
opened 2026-01-29 16:28:50 +00:00 by claunia · 8 comments
Owner

Originally created by @ghost on GitHub (Nov 4, 2017).

Originally assigned to: @robertmuehsig on GitHub.

Linux, fedora 27
$ dotnet --version

2.0.2

$ node --version

v8.6.0

$ which electron-packager

/usr/bin/electron-packager

$ touch ./Properties/launchSettings.json
$ dotnet electronize init

Adding our config file to your project...
Search your .csproj to add the needed electron.manifest.json...
Found your .csproj: /home/ilya/edn/edn.csproj - check for existing config or update it.
electron.manifest.json will be added to csproj.
electron.manifest.json added in csproj!
Search your .launchSettings to add our electron debug profile...
Debug profile added!
Everything done - happy electronizing!

$ dotnet electronize start

Start Electron Desktop Application...
Microsoft (R) Build Engine версии 15.4.8.50001 для .NET Core
(C) Корпорация Майкрософт (Microsoft Corporation). Все права защищены.

  edn -> /home/ilya/edn/bin/Debug/netcoreapp2.0/win10-x64/edn.dll
  edn -> /home/ilya/edn/obj/Host/bin/

Start npm install...

> uws@0.14.5 install /home/ilya/edn/obj/Host/node_modules/uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0

> electron@1.7.8 postinstall /home/ilya/edn/obj/Host/node_modules/electron
> node install.js

npm WARN ElectronNET.Host@1.0.0 No description
npm WARN ElectronNET.Host@1.0.0 No repository field.

added 195 packages in 5.628s

Invoke electron.cmd - in dir: /home/ilya/edn/obj/Host/node_modules/.bin
bash: строка 1: electron.cmd: команда не найдена

electron.cmd ? Is it a windows batch script?

Originally created by @ghost on GitHub (Nov 4, 2017). Originally assigned to: @robertmuehsig on GitHub. Linux, fedora 27 **$ dotnet --version** 2.0.2 **$ node --version** v8.6.0 **$ which electron-packager** /usr/bin/electron-packager **$ touch ./Properties/launchSettings.json** **$ dotnet electronize init** Adding our config file to your project... Search your .csproj to add the needed electron.manifest.json... Found your .csproj: /home/ilya/edn/edn.csproj - check for existing config or update it. electron.manifest.json will be added to csproj. electron.manifest.json added in csproj! Search your .launchSettings to add our electron debug profile... Debug profile added! Everything done - happy electronizing! **$ dotnet electronize start** Start Electron Desktop Application... Microsoft (R) Build Engine версии 15.4.8.50001 для .NET Core (C) Корпорация Майкрософт (Microsoft Corporation). Все права защищены. edn -> /home/ilya/edn/bin/Debug/netcoreapp2.0/win10-x64/edn.dll edn -> /home/ilya/edn/obj/Host/bin/ Start npm install... > uws@0.14.5 install /home/ilya/edn/obj/Host/node_modules/uws > node-gyp rebuild > build_log.txt 2>&1 || exit 0 > electron@1.7.8 postinstall /home/ilya/edn/obj/Host/node_modules/electron > node install.js npm WARN ElectronNET.Host@1.0.0 No description npm WARN ElectronNET.Host@1.0.0 No repository field. added 195 packages in 5.628s Invoke electron.cmd - in dir: /home/ilya/edn/obj/Host/node_modules/.bin bash: строка 1: electron.cmd: команда не найдена electron.cmd ? Is it a windows batch script?
claunia added the bug label 2026-01-29 16:28:50 +00:00
Author
Owner

@robertmuehsig commented on GitHub (Nov 4, 2017):

Ah - this is indeed a bug. The start command ist in the current version Windows only. I try to fix it this weekend.
I only tried Ubuntu in a VM, cloud you maybe do a "dotnet electronize build" and check if you can start the application under /ElectronNET.WebApp/bin/desktop/..." ?

@robertmuehsig commented on GitHub (Nov 4, 2017): Ah - this is indeed a bug. The start command ist in the current version Windows only. I try to fix it this weekend. I only tried Ubuntu in a VM, cloud you maybe do a "dotnet electronize build" and check if you can start the application under /ElectronNET.WebApp/bin/desktop/..." ?
Author
Owner

@robertmuehsig commented on GitHub (Nov 4, 2017):

Be aweare that dotnet electonize build require that the electron packer is installed globally via npm.

@robertmuehsig commented on GitHub (Nov 4, 2017): Be aweare that dotnet electonize build require that the electron packer is installed globally via npm.
Author
Owner

@robertmuehsig commented on GitHub (Nov 4, 2017):

Electron comes with this electron.cmd, unfortunately we forgot to invoke the "electron" bash script when we are not on Windows. My commit should resolve this and this will be part of v0.0.6.

@robertmuehsig commented on GitHub (Nov 4, 2017): Electron comes with this electron.cmd, unfortunately we forgot to invoke the "electron" bash script when we are not on Windows. My commit should resolve this and this will be part of v0.0.6.
Author
Owner

@robertmuehsig commented on GitHub (Nov 4, 2017):

Ups - the start command still has some windows specifics in it.

@robertmuehsig commented on GitHub (Nov 4, 2017): Ups - the start command still has some windows specifics in it.
Author
Owner

@robertmuehsig commented on GitHub (Nov 4, 2017):

Ok - the same "logic" that I use in the build command is now part of the start command as well. With 0.0.6 you (or when you refresh your local sources and clean the NuGet cache (e.g. via th devCleanup inside the CLI project)) it should hopefully work.

@robertmuehsig commented on GitHub (Nov 4, 2017): Ok - the same "logic" that I use in the build command is now part of the start command as well. With 0.0.6 you (or when you refresh your local sources and clean the NuGet cache (e.g. via th devCleanup inside the CLI project)) it should hopefully work.
Author
Owner

@robertmuehsig commented on GitHub (Nov 5, 2017):

I released Version 0.0.6.

@robertmuehsig commented on GitHub (Nov 5, 2017): I released Version 0.0.6.
Author
Owner

@ghost commented on GitHub (Nov 11, 2017):

You say

"Be aweare that dotnet electonize build require that the electron packer is installed globally via npm."

Using of global node modules is not very good idea. User should not be able to run commands as root.
For what purpose u use global node modules? Just because u can do it?
Can u just use node_modules folder from project?

@ghost commented on GitHub (Nov 11, 2017): You say > "Be aweare that dotnet electonize build require that the electron packer is installed globally via npm." Using of global node modules is not very good idea. User should not be able to run commands as root. For what purpose u use global node modules? Just because u can do it? Can u just use node_modules folder from project?
Author
Owner

@robertmuehsig commented on GitHub (Nov 12, 2017):

I opened a new issue regarding the global electron packer - TBH: I don't know if it would also work without the globally installed package. If yes, then I would prefer it as well, but I tried it once and failed, but I can't remember why 😃

@robertmuehsig commented on GitHub (Nov 12, 2017): I opened a new issue regarding the global electron packer - TBH: I don't know if it would also work without the globally installed package. If yes, then I would prefer it as well, but I tried it once and failed, but I can't remember why 😃
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#50