Repository navigation
Closed
Description
Newer Electron versions starting with 42.0.0 no longer work with Electron.NET. I tested the most recent version (42.3.3) which doesn't work, as well as the last major version (41.7.1) which still works. I also tried upgrading to the latest electron-builder version (26.14.0) without luck.
- NuGet Version: 0.5.0
- Electron Version: 42.3.3 (also tested with 42.0.0)
- Electron Builder Version: 26.8.1
- Framework: net10.0
- Target: linux-arm64
- IDE: Visual Studio 18.6.2
Given the log entries, it seems like some parts of the build pipeline that produces the .electron folder are broken.
GatherBuildInfo: No testhost detected: TestApp
Probe scored for launch origin: DotNet 3 vs. 0 Electron
Probe scored for package mode: Unpackaged 4 vs. 0 Packaged
Evaluated StartupMethod: UnpackedDotnetFirst
[StartInternal]: startCmd: C:\Users\Aeon\source\repos\Temp\TestApp\TestApp\bin\Debug\net10.0\win-x64\.electron\node_modules\electron\dist\electron
[StartInternal]: args: main.js -unpackeddotnet --trace-warnings -electronforcedport=0 C:\Users\Aeon\source\repos\Temp\TestApp\TestApp\bin\Debug\net10.0\win-x64\TestApp.dll
[StartInternal]: Exception:
[StartInternal]: Exception:
[StartInternal]: Exception: System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'C:\Users\Aeon\source\repos\Temp\TestApp\TestApp\bin\Debug\net10.0\win-x64\.electron\node_modules\electron\dist\electron' with working directory 'C:\Users\Aeon\source\repos\Temp\TestApp\TestApp\bin\Debug\net10.0\win-x64\.electron'. The system cannot find the file specified.
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at ElectronNET.Common.ProcessRunner.Run(RunnerParams runnerParams)
at ElectronNET.Common.ProcessRunner.Run(String exeFileName, String commandLineArgs, String workingDirectory)
at ElectronNET.Runtime.Services.ElectronProcess.ElectronProcessActive.StartInternal(String startCmd, String args, String directory)
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://127.0.0.1:56447
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
Content root path: C:\Users\Aeon\source\repos\Temp\TestApp\TestApp
Steps to reproduce:
- Create a new blazor web app (
dotnet new blazor) - Add the
ElectronNET.CoreandElectronNET.Core.AspNetNuGet packages version0.5.0 - Add
UseElectron()to the builder, etc. (follow getting started from Wiki) - Add the following to the csproj file:
<PropertyGroup Label="ElectronNetCommon">
<ElectronVersion>42.0.0</ElectronVersion>
<ElectronBuilderVersion>26.8.1</ElectronBuilderVersion>
</PropertyGroup>
Activity
AeonSake commentedon Jun 4, 2026
The strange part is, that the folder does exist and was updated with the (presumably) correct content. However, the file under
.electron\node_modules\electron\dist\electrondoes not (distfolder is missing). It looks like electron 42.0.0 and later no longer ship a post-install script to fetch the binaries as part of the npm package; users need to fetch them via@electron/getinstead. Release post for electron 42: https://www.electronjs.org/blog/electron-42-0FlorianRappl commentedon Jun 5, 2026
I think this makes sense as postinstall scripts will more and more fade out (due to security problems).
We will need to address this. Thanks for reporting. I will try to find some time on the weekend to look at this.
FlorianRappl commentedon Jun 7, 2026
Landed in preview - will be published with 0.5.1.