electron-builder parameter mismatch #679

Closed
opened 2026-01-29 16:45:48 +00:00 by claunia · 3 comments
Owner

Originally created by @denniskrq on GitHub (Jun 29, 2021).

Originally assigned to: @GregorBiswanger on GitHub.

  • 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.

Originally created by @denniskrq on GitHub (Jun 29, 2021). Originally assigned to: @GregorBiswanger on GitHub. <!-- Please search existing issues to avoid creating duplicates. --> <!-- Which version of Electron.NET CLI and API are you using? --> <!-- Please always try to use latest version before report. --> * **Version**: 11.5.1 <!-- Which version of .NET Core and Node.js are you using (if applicable)? --> <!-- What target are you building for? --> * **Target**: win7x64 <!-- Enter your issue details below this comment. --> <!-- If you want, you can donate to increase issue priority (https://donorbox.org/electron-net) --> 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.
claunia added the bug label 2026-01-29 16:45:48 +00:00
Author
Owner

@Jennal commented on GitHub (Jul 1, 2021):

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 commented on GitHub (Jul 1, 2021): 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 " ```
Author
Owner

@Jennal commented on GitHub (Jul 6, 2021):

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 commented on GitHub (Jul 6, 2021): > 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.
Author
Owner

@GregorBiswanger commented on GitHub (Mar 28, 2023):

🎉🚀 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 commented on GitHub (Mar 28, 2023): 🎉🚀 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!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#679