mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-04 05:34:51 +00:00
Error handling in ProcessHelper #291
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 @paralaxsd on GitHub (Mar 12, 2019).
Originally assigned to: @GregorBiswanger on GitHub.
Hi,
While trying to electronize an asp.net core angular application I found a limitation in the way "electronize start" works that prevents the process from finishing successfully:
Running
electronize startin my web application directory bails with "Error occurred during dotnet publish: 1"The reason for this became clear once I looked at ElectronNET.CLI:
1.) Angular ASP.NET Core applications come with an extra msbuild target that's run when publishing. This target runs
npm installandnpm run build -- --prod. This yields lots of console output.2.)
electronize startends up runningdotnet publish <args>using theProcessHelper.CmdExecutemethod.3.) ProcessHelper will bail out with return code 1 once it detects the sub string "error" in the process output streams.
4.)
electronize startbails out because the output generated by npm run contains the string "error". In my case the exact value is "14% building 40/42 modules 2 active ...pp\src\app\views\error\404.component.ts".Now that I know what's happening I can temp fix this issue by ensuring that npm stays silent. However I'd appreciate if you could come up with a way to prevent us from falling into this trap.
Thanks!
@GregorBiswanger commented on GitHub (Mar 28, 2023):
🎉🚀 New Electron.NET version 23.6.1 released 🚀🎉
With native Electron 23 and .NET 6 support. Your problem should be fixed here. If you continue to have the problem, please let us know. Please note the correct updating of your API & CLI. Info in the README. Have fun!