mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-04 05:34:51 +00:00
electronize start fails when /obj folder is missing #362
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 @asandersSAP on GitHub (Jul 12, 2019).
Originally assigned to: @GregorBiswanger on GitHub.
ElectronNET.API Version="5.22.13"
Problem: We have an Electron App with some Angular clients we want to build. You can find the base structure of our App here : https://github.com/manfredsteyer/angular-microapp
We followed your README and installed everything correctly. But when we call
electronize startfor the first time it fails with "Error occurred during dotnet publish: 1" but no further information. If we call it a second time the build process goes on.After hours of debugging we found out that its the
root/objfolder. If this folder is missing, the build process fails. But at the same time the build process creates the /obj folder. So it seems like the creation is too slow, the build process needs it and crashes.I think I found out where the bug comes from: Electron.NET/ElectronNET.CLI/Commands/StartElectronCommand.cs at line 44
you create the /obj folder if it's not there already (which works but maybe not fast enough?) because it breaks a few lines later. Maybe on line 53 where you need the path:
var resultCode = ProcessHelper.CmdExecute($"dotnet publish -r {platformInfo.NetCorePublishRid} --output "{tempBinPath}"", aspCoreProjectPath); or so on
The second build runs because /obj already exists. If we manually delete the /obj folder - the build crashes again and works the second time.
Can you maybe help to investigate?
@GregorBiswanger commented on GitHub (Jul 26, 2019):
Is it possible that you provide me with a small prototype that I can see for myself?
@ErikApption commented on GitHub (Oct 31, 2019):
Just been having the same issue - I get "Error occurred during dotnet publish: 1" on a clean build but on a subsequent build, the app starts. Might be hard to provide you a repro because it seems to be hardware/platform dependent, the other members of my team did not have any issues building the electron application.
@GregorBiswanger commented on GitHub (May 10, 2020):
Fixed with Electron.NET 8.31.1.