mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
Unable to publish/build on windows #522
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @HaydnDias on GitHub (Jul 2, 2020).
Originally assigned to: @GregorBiswanger on GitHub.
Node.js version: 12.18.2 (upgraded from 12.13.1 when the issue started)
When running
electronize build /target win, the build errors out with:Unknown argument: .This started today after upgrading the dotnet electronnet.cli tool from 5.30.1 -> 9.31.1, I was running it most of the day doing builds and then suddenly with the same commands and without code changes, started getting this issue. I uninstalled and reinstalled, and did a clean setup on a new windows install with the same versions I had previously running and got the same issue.
Running the command
npx electron-builder --config=./bin/electron-builder.json --win --x64 -c.electronVersion=9.0.3(notice the period is removed), results in it working correctly. This happens on our code base on multiple machines (including clean installs) and it happened on your https://github.comElectronNET/electron.net-api-demos too.
@xcs-katsuki commented on GitHub (Jul 3, 2020):
Hi.
I have the same problem.
I ran the following command after electronize build command.
npx electron-builder --config=./bin/electron-builder.json --win --x64 -c.electronVersion=9.0.3Because error said the period is unknown, I erased the period that at after 'electron-builder'.
@puddleme commented on GitHub (Jul 3, 2020):
Hi,
I am having this issue aswell.
Running
electronize build /target win, I am gettingError: Unknown argument: .I've tried on my dev machine and on a fresh machine that hasn't worked with Electron before. Also tried changing electron cli, node versions and building a branch that worked in the morning yesterday. Each time I get
Error: Unknown argument: .@lucasferla7 commented on GitHub (Jul 3, 2020):
Hello,
I also have this problem.
Versions:
@rbaker26 commented on GitHub (Jul 4, 2020):
Cannot Build on Windows or Linux
Same problem, but I cannot build on Windows (CMD or Terminal) or Linux (WSL2 -HyperV)
I have attached my Makefile and the script file of it running on Ubuntu 18.04 (WSL2-HyperV VM)
In this makefile, I tried to build all the targets (win, linux, osx).
This Makefile has worked for me previously and has made viable builds for Windows and Linux.
All of my codebase is running .NET Core 3.1.
I had to add .txt to my Makefile and scriptfile to attach it to this comment.
Makefile .txt
typescript.txt
Here is a screenshot of some output from the build.

It is this section that I have never seen before.
WSL2 Info:
Ubuntu WSL2 Info:
System Info:
@rbaker26 commented on GitHub (Jul 4, 2020):
@GregorBiswanger
@HaydnDias
I summited a PR to fix this issue.
See PR #443
@zenith6495 commented on GitHub (Jul 4, 2020):
I've noticed this issue is caused by electron-builder, as electronize build runs npm install electron-builder latest v22.7.0 which does not accept "." in the command thus causing the issue. If you try to manually install electron-builder v21 or v20 it will build without issue.
Alternatively, author should remove the "." from the command as well. I don't know what's the purpose of including that "." in the command, can any experienced pros mind sharing? is the "." for Mac or Linux?
@jadhavrani123 commented on GitHub (Jul 4, 2020):
I am also facing same problem of unknown argument . in npx electron builder command .Please give some solution.
@rbaker26 commented on GitHub (Jul 4, 2020):
@zenith6495 @jadhavrani123
I submitted a PR to fix this issue already.
The Gegor, the repo admin, has added it to milestone 9.31.2, so it should work itself out once the milestone gets published.
@GregorBiswanger commented on GitHub (Jul 4, 2020):
Hello Community, It is an electron builder problem that has a parameter removed. We got a PR with a solution. I think on Monday version 9.31.2 should be released as soon as possible. Big thanks to @rbaker26 for the PR...
@HaydnDias commented on GitHub (Jul 4, 2020):
@GregorBiswanger Thank you for the quick update, I thought removing the . was going to be the fix but wasn't fully sure why it was there to begin with, thanks again!
@Altamiraozan commented on GitHub (Jul 9, 2020):
is this solved for latest version? (.net core 3.0)