ElectronNET / Electron.NET

:electron: Build cross platform desktop apps with ASP.NET Core (Razor Pages, MVC, Blazor).

Home Page:https://gitter.im/ElectronNET/community

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Electron version is not changing when using electronVersion in electron.manifest.json

yuriiproniuk opened this issue · comments

commented

ElectronNET.CLI Version: 23.6.1.0
Electron Version: 23.2.0
.NET Version: 6.0.406
Node.js - v16.16.0

Building for target: Windows

Steps to Reproduce:

  1. Update Electron and Electron CLI to latest versions
  2. Build and publish app using electronize build.
  3. Observe version of Electron used: 23.2.0
  4. Go to electron.manifest.json and add "electronVersion": "22.0.0", to the "build" section.
  5. Build and publish app using electronize build.
  6. Observe version of Electron used: 23.2.0

Expected result: Electron version used should be 22.0.0

Other things I tried to downgrade electron version:

  • changing the version in package.json
  • removing electron from package.json totally so it picks the version from electron.manifest.json
  • deleting node_modules and running npm install

None of it worked.

I need to downgrade version of electron in my app so it uses Chromium v108 and I found that the sufficient version of electron which uses it is 22.0.0. But none of the ways I could find in documentation or anywhere else work.

Could you please tell me how to do it? Is it even possible?

We don't have a setting with "electronVersion": "22.0.0" - how do you get that?

Our versioning with Electron 23.6.1 is structured like this: Native Electron Support Version 23 - .NET 6 and our internal release for this combination is 1.

commented

So there is no ability to target Electron version that would use Chromium v108?

No, that is fixed in Electron. Only a newer Electron version has a more recent Chromium version.

commented

So is there no way to specify the version of electron? On of my machines an old version is used, how can I set it to use a recent version?
I'm using electronize build /target win. On my machine and it uses electron 23.2.0.
When I run the command on another machine it uses electron 13.1.5 even though the ElectronNET.CLI and node.js and npm versions are the same on both machines.
Probably because of the old Electron version the app does not run.
I can see the version used in the output from electronize command: Package Electron App for Platform win...
npx electron-builder --config=./bin/electron-builder.json --win --x64 -c.electronVersion=13.1.5

Hi there, we also need this feature, as we had an issue in our Greenland app due to the daylight saving time changes introduced there. Electron v23.2.0 returns the wrong time when using the Greenland time zone (new Date() in console), v24.0.0+ the time is returned correctly.

We mitigated the issue by building electronnet.cli from source and passing the correct version of electron to the electron-builder call (in BuildCommand.cs).

For electronize start we also modified the package.json that's being copied into the obj/host folder.

It would be nice if the electron version could be specified on the command line without the need to build our own executable, as a lot of Electron versions are fully or mostly compatible with the current ElectronNET.API.