mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
[PR #988] [MERGED] Core: Introduce cross-platform npm restore and check mismatch on publish #1399
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?
📋 Pull Request Information
Original PR: https://github.com/ElectronNET/Electron.NET/pull/988
Author: @softworkz
Created: 12/15/2025
Status: ✅ Merged
Merged: 12/17/2025
Merged by: @FlorianRappl
Base:
develop← Head:submit_crossdebug📝 Commits (4)
df8e269Core: Introduce cross-platform npm restore and check mismatch on publish2d6d4e2Fix up incorrect symlinks created by npm on Windows1d6ef7aElectronProcessActive: Mark binaries as executable when debugging9d03787ElectronProcessActive: Add check for platform mismatch📊 Changes
2 files changed (+167 additions, -25 deletions)
View changed files
📝
src/ElectronNET.API/Runtime/Services/ElectronProcess/ElectronProcessActive.cs(+89 -6)📝
src/ElectronNET/build/ElectronNET.LateImport.targets(+78 -19)📄 Description
This PR may seem contradictive at first sight.. :-)
It does this:
This has caused user confusion because it can too easily be gotten wrong. Now it's no longer possible to build for OS A on OS B.
One exception: Linux packages can be build on Windows (WSL)
npm installThis means for example: When you are on Windows and osx-x64 is selected as RID, then the npm restore will do the restore as if it was on OSX.
In case of mismatch, it exists with an appropriate error message
(it would fail anyway, but without explanation otherwise)
So - why do x-platform npm restore first and then error out on platform mismatch when publishing?
It's all about debugging - remote debugging. And again, the fast way is of course without packaging - i.e. how debug is working now. For remote debugging, we need to have everything ready to work on the target/remote machine. For .net it's not a problem anyway, but the Electron executable is platform-dependent, This PR allows to get the right one, so that we can end up with a file set which runs on the target direct.ly, without any additional steps needed.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.