Skip to content

Electron-Builder Incorrectly Uses Host RID for Build #1097

Description

@AeonSake

I'm unsure what exactly caused this bug, but the recent 0.5.2 update has broken my current cross-platform build pipeline. It seems like the electron-builder is now always building binaries for the RID of the host system, rather than the RID provided via the CLI args or publish profile. This issue occurs on all platforms; I tested the following scenarios:

  • Targeting win-arm64 while on win-x64
  • Targeting osx-x64 while on osx-arm64
  • Targeting linux-x64 while on linux-arm64

Configuration:

  • Package Version: 0.5.2
  • Electron Version: 42.4.1
  • Electron Builder Version: 26.8.1
  • Framework: net10.0
  • Target: any

Steps to Reproduce:

  1. Install the latest package version (0.5.2)
  2. Specify an RID with an architecture different from the host system (e.g., win-arm64 on a win-x64 system) via a publish profile (RuntimeIdentifier)
  3. Build the project using the same RID (e.g., dotnet publish MyProject.csproj -c Release -r win-arm64 -p:PublishProfile=win-arm64)
  4. Investigate/test the build artifacts; the electron-builder output will also have the incorrect name (e.g., linux-arm64-unpacked on a linux-arm64 system when targeting linux-x64 for which the folder should be called linux-unpacked by default)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions