Electron.NET
Electron.NET copied to clipboard
electron-builder parameter mismatch
- Version: 11.5.1
- Target: win7x64
Steps to Reproduce:
- Execute
electronize build /target custom "win7-x64;win64"
as suggested in the custom target documentation - Observe the final output for
npx electron-builder --config=./bin/electron-builder.json --win64 --x64 -c.electronVersion=11.1.1
to beUnknown 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.
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 "
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.
🎉🚀 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!