mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
electronize start /watch not work, but electronize start does #661
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 @redplane on GitHub (May 12, 2021).
Steps to Reproduce:
2.Run
electronize initto initialize mainifest fileelectronize start /watchWhat happens:
Previously, application can run and Electron window displayed with web content.
Now, electron window is not displayed even there is no error written on Console command prompt:

Electron processes ara found in Task Manager, however, there is no window of Electron to be displayed

However, if I run the command

electronize start(without /watch), the application can run and electron window can be displayedI really need to run
electronize start /watchto have the live reload function to work while I'm in development stage.@redplane commented on GitHub (May 13, 2021):
Finally, I found the problem and solution.
After having tried
electronize start /watchagain and again without luck. I changed the profile in Visual Studio fromElectron.NET ApptoIIS Expressas below:When I pressed F5, it threw an error:

The issue happened because I inject a
SCOPEDservice (which has been added byservice.AddScoped) intoSINGLETONservice (which has been added byservice.AddSingleton). When I fixed that issue, bothF5andelectronize start /watchworked smoothly as the old days :)Hope this will help someone else who has the same problem as I do.