electronize start fails when /obj folder is missing #359

Open
opened 2026-01-29 16:37:33 +00:00 by claunia · 0 comments
Owner

Originally created by @asandersSAP on GitHub (Jul 12, 2019).

Originally assigned to: @GregorBiswanger on GitHub.

ElectronNET.API Version="5.22.13"

  • Version: netcoreapp2.2 on any machine (win10, osx), node: 12.6.0, npm: 6.9.0

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 start for 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/obj folder. 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?

Originally created by @asandersSAP on GitHub (Jul 12, 2019). Originally assigned to: @GregorBiswanger on GitHub. <!-- Which version of Electron.NET CLI and API are you using? --> ElectronNET.API Version="5.22.13" <!-- Please always try to use latest version before report. --> * **Version**: netcoreapp2.2 on any machine (win10, osx), node: 12.6.0, npm: 6.9.0 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 start` for 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/obj` folder. 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?
claunia added the bug label 2026-01-29 16:37:34 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#359