Skip to content

Unable to publish/build on windows #441

@HaydnDias

Description

@HaydnDias
  • Version: 9.31.1

Node.js version: 12.18.2 (upgraded from 12.13.1 when the issue started)

  • Target: win

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.bokerqi.topElectronNET/electron.net-api-demos too.

C:\GIT\electron.net-api-demos>electronize build /target win
Build Electron Application...
Build ASP.NET Core App for win-x64...
Executing dotnet publish in this directory: C:\GIT\electron.net-api-demos\obj\desktop\win
Build ASP.NET Core App for win-x64 under Release-Configuration...
Microsoft Windows [Version 10.0.18362.657]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\GIT\electron.net-api-demos>dotnet publish -r win-x64 -c "Release" --output "C:\GIT\electron.net-api-demos\obj\desktop\win\bin" /p:PublishReadyToRun=true --self-contained
Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
  Determining projects to restore...
  Restored C:\GIT\electron.net-api-demos\ElectronNET-API-Demos\ElectronNET-API-Demos.csproj (in 1.59 sec).

  ElectronNET-API-Demos -> C:\GIT\electron.net-api-demos\ElectronNET-API-Demos\bin\Release\netcoreapp3.1\win-x64\ElectronNET-API-Demos.dll
  ElectronNET-API-Demos -> C:\GIT\electron.net-api-demos\ElectronNET-API-Demos\bin\Release\netcoreapp3.1\win-x64\ElectronNET-API-Demos.Views.dll
  ElectronNET-API-Demos -> C:\GIT\electron.net-api-demos\obj\desktop\win\bin\
C:\GIT\electron.net-api-demos>
Start npm install...
Microsoft Windows [Version 10.0.18362.657]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\GIT\electron.net-api-demos\obj\desktop\win>npm install --production
npm WARN deprecated tslint@6.1.2: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN ws@7.3.0 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.3.0 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
added 66 packages from 102 contributors and audited 180 packages in 4.035s
found 2 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
C:\GIT\electron.net-api-demos\obj\desktop\win>
ElectronHostHook handling started...
Build Electron Desktop Application...
Executing electron magic in this directory: C:\GIT\electron.net-api-demos\bin\desktop
Create electron-builder configuration file...
Microsoft Windows [Version 10.0.18362.657]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\GIT\electron.net-api-demos\obj\desktop\win>node build-helper.js electron.manifest.json
C:\GIT\electron.net-api-demos\obj\desktop\win>
Package Electron App for Platform win...
Microsoft Windows [Version 10.0.18362.657]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\GIT\electron.net-api-demos\obj\desktop\win>npx electron-builder . --config=./bin/electron-builder.json --win --x64 -c.electronVersion=9.0.3
cli.js build
Build
Building:
  --mac, -m, -o, --macos   Build for macOS, accepts target list (see
                           https://goo.gl/5uHuzj).                       [array]
  --linux, -l              Build for Linux, accepts target list (see
                           https://goo.gl/4vwQad)                        [array]
  --win, -w, --windows     Build for Windows, accepts target list (see
                           https://goo.gl/jYsTEJ)                        [array]
  --x64                    Build for x64                               [boolean]
  --ia32                   Build for ia32                              [boolean]
  --armv7l                 Build for armv7l                            [boolean]
  --arm64                  Build for arm64                             [boolean]
  --dir                    Build unpacked dir. Useful to test.         [boolean]
  --prepackaged, --pd      The path to prepackaged app (to pack in a
                           distributable format)
  --projectDir, --project  The path to project directory. Defaults to current
                           working directory.
  --config, -c             The path to an electron-builder config. Defaults to
                           `electron-builder.yml` (or `json`, or `json5`), see
                           https://goo.gl/YFRJOM
Publishing:
  --publish, -p  Publish artifacts, see https://goo.gl/tSFycD
                [choices: "onTag", "onTagOrDraft", "always", "never", undefined]
Other:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]
Examples:
  electron-builder -mwl                     build for macOS, Windows and Linux
  electron-builder --linux deb tar.xz       build deb and tar.xz for Linux
  electron-builder --win --ia32             build for Windows ia32
  electron-builder                          set package.json property `foo` to
  -c.extraMetadata.foo=bar                  `bar`
  electron-builder                          configure unicode options for NSIS
  --config.nsis.unicode=false
Unknown argument: .
C:\GIT\electron.net-api-demos\obj\desktop\win>
... done

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions