Electron.NET icon indicating copy to clipboard operation
Electron.NET copied to clipboard

electron-builder parameter mismatch

Open denniskrq opened this issue 3 years ago • 2 comments

  • Version: 11.5.1
  • Target: win7x64

Steps to Reproduce:

  1. Execute electronize build /target custom "win7-x64;win64" as suggested in the custom target documentation
  2. Observe the final output for npx electron-builder --config=./bin/electron-builder.json --win64 --x64 -c.electronVersion=11.1.1 to be Unknown argument: win64

The issue seems to be that the Electronize CLI code uses the string after the semicolon in the custom target as the Electron packer platform ("win64" in my case). However, electron-builder does not accept "win64" as a valid build target, only "win" (see: https://www.electron.build/cli). The documentation for custom target should be updated to reflect this.

denniskrq avatar Jun 29 '21 19:06 denniskrq

same issue here.

$ electronize build /target win
Build Electron Application...
Error: missing 'target' argument.
Needed: '/target' with params 'win/osx/linux' to build for a typical app or use 'custom' and specify .NET Core build config & electron build config
 for custom target, check .NET Core RID Catalog and Electron build target/
 e.g. '/target win' or '/target custom "win7-x86;win32"'
Optional: '/dotnet-configuration' with the desired .NET Core build config e.g. release or debug. Default = Release
Optional: '/electron-arch' to specify the resulting electron processor architecture (e.g. ia86 for x86 builds). Be aware to use the '/target custom' param as well!
Optional: '/electron-params' specify any other valid parameter, which will be routed to the electron-packager.
Optional: '/relative-path' to specify output a subdirectory for output.
Optional: '/absolute-path to specify and absolute path for output.
Optional: '/package-json' to specify a custom package.json file.
Optional: '/install-modules' to force node module install. Implied by '/package-json'
Full example for a 32bit debug build with electron prune: build /target custom win7-x86;win32 /dotnet-configuration Debug /electron-arch ia32  /electron-params "--prune=true "

Jennal avatar Jul 01 '21 11:07 Jennal

same issue here.

$ electronize build /target win
Build Electron Application...
Error: missing 'target' argument.
Needed: '/target' with params 'win/osx/linux' to build for a typical app or use 'custom' and specify .NET Core build config & electron build config
 for custom target, check .NET Core RID Catalog and Electron build target/
 e.g. '/target win' or '/target custom "win7-x86;win32"'
Optional: '/dotnet-configuration' with the desired .NET Core build config e.g. release or debug. Default = Release
Optional: '/electron-arch' to specify the resulting electron processor architecture (e.g. ia86 for x86 builds). Be aware to use the '/target custom' param as well!
Optional: '/electron-params' specify any other valid parameter, which will be routed to the electron-packager.
Optional: '/relative-path' to specify output a subdirectory for output.
Optional: '/absolute-path to specify and absolute path for output.
Optional: '/package-json' to specify a custom package.json file.
Optional: '/install-modules' to force node module install. Implied by '/package-json'
Full example for a 32bit debug build with electron prune: build /target custom win7-x86;win32 /dotnet-configuration Debug /electron-arch ia32  /electron-params "--prune=true "

The problem occured when I use git bash in windows. When I use cmd, the problem gone.

Jennal avatar Jul 06 '21 07:07 Jennal

🎉🚀 New Electron.NET version 23.6.1 released 🚀🎉

With native Electron 23 and .NET 6 support. Your problem should be fixed here. If you continue to have the problem, please let us know. Please note the correct updating of your API & CLI. Info in the README. Have fun!

GregorBiswanger avatar Mar 28 '23 15:03 GregorBiswanger