mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
All "electronize" commands fail, claiming that dotnet failed even when it does not fail #665
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?
Originally created by @zaneclaes on GitHub (May 28, 2021).
I am able to run
dotnet publish,dotnet build, andyarn buildall without errors. However, when I runelectronize startorelectronize build, I get a failure:I searched and found https://github.com/ElectronNET/Electron.NET/issues/206 but since the above commands work, I'm not sure it applies. Specifically, if I run
dotnet publishand thenecho $?, it prints0. However, I still get the error message above if I subsequently runelectronize start.Here is the full log from the
electronize startcommand. I don't see any logs that indicate the reason for the build failure. So I dug thru the source code for this repo and attempted to manually recreate the CLI arguments passed to dotnet. Even still, this command succeeds when run manually:Since ElectronNET is swallowing the error, I'm not sure what the problem is.
Which version of Electron.NET CLI and API are you using?
11.5.1for both.Which version of .NET Core and Node.js are you using (if applicable)?
Dotnet
5.0.102. Nodev15.10.0.What target are you building for?
I'm developing on Mac OS. I have not yet succeeded in building.
@zaneclaes commented on GitHub (Jun 8, 2021):
The problem was that electronize does not support the
*.csprojformat used by the React SPA template. Specifically, the template includes sections that build the NPM project as part of the pre/post-build process. I noticed that this was not present in the example project fordotnet5. Removing them means thatnpm install(oryarn install) must be completed before the project build, but it fixes the problem.@lukedukeus commented on GitHub (Feb 21, 2024):
Just ran into the same thing, I was also able to fix it by keeping the
.csprojfile the same and turning offPublishSingleFileby runningelectronize build /target win /PublishSingleFile false. In my caseelectronize startworked fine, but building did not work.