electronize start /watch not work, but electronize start does #661

Closed
opened 2026-01-29 16:45:26 +00:00 by claunia · 1 comment
Owner

Originally created by @redplane on GitHub (May 12, 2021).

  • Already searched
  • API : 11.5.1
  • CLI: 11.5.1
  • Net 5
  • Node 12.10.0
  • Target: Windows x64

Steps to Reproduce:

  1. Initialize an electron.net project using Angular
    2.Run electronize init to initialize mainifest file
  2. Run electronize start /watch

What 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:
    image

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

  • However, if I run the command electronize start (without /watch), the application can run and electron window can be displayed
    image

I really need to run electronize start /watch to have the live reload function to work while I'm in development stage.

Originally created by @redplane on GitHub (May 12, 2021). <!-- Please search existing issues to avoid creating duplicates. --> - Already searched <!-- Which version of Electron.NET CLI and API are you using? --> - **API** : 11.5.1 - **CLI**: 11.5.1 <!-- Which version of .NET Core and Node.js are you using (if applicable)? --> - Net 5 - Node 12.10.0 <!-- What target are you building for? --> * **Target**: Windows x64 Steps to Reproduce: 1. Initialize an electron.net project using Angular 2.Run `electronize init` to initialize mainifest file 3. Run `electronize start /watch` What 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: ![image](https://user-images.githubusercontent.com/7974095/118037864-991abf80-b398-11eb-88e8-b8d7c2a4b657.png) - Electron processes ara found in Task Manager, however, there is no window of Electron to be displayed ![image](https://user-images.githubusercontent.com/7974095/118037967-bb144200-b398-11eb-83e8-b8f44a985bc9.png) - However, if I run the command `electronize start` (without /watch), the application can run and electron window can be displayed ![image](https://user-images.githubusercontent.com/7974095/118038511-66bd9200-b399-11eb-8406-6d9e2cc173fc.png) I really need to run `electronize start /watch` to have the live reload function to work while I'm in development stage.
claunia added the bug label 2026-01-29 16:45:26 +00:00
Author
Owner

@redplane commented on GitHub (May 13, 2021):

Finally, I found the problem and solution.
After having tried electronize start /watch again and again without luck. I changed the profile in Visual Studio from Electron.NET App to IIS Express as below:

image

When I pressed F5, it threw an error:
image

The issue happened because I inject a SCOPED service (which has been added by service.AddScoped) into SINGLETON service (which has been added by service.AddSingleton). When I fixed that issue, both F5 and electronize start /watch worked smoothly as the old days :)

Hope this will help someone else who has the same problem as I do.

@redplane commented on GitHub (May 13, 2021): Finally, I found the problem and solution. After having tried `electronize start /watch` again and again without luck. I changed the profile in Visual Studio from `Electron.NET App` to `IIS Express` as below: ![image](https://user-images.githubusercontent.com/7974095/118076683-e28cfe00-b3dc-11eb-9d37-b89871523a18.png) When I pressed F5, it threw an error: ![image](https://user-images.githubusercontent.com/7974095/118076833-23851280-b3dd-11eb-89f6-fb2ecfa73f60.png) The issue happened because I inject a `SCOPED` service (which has been added by `service.AddScoped`) into `SINGLETON` service (which has been added by `service.AddSingleton`). When I fixed that issue, both `F5` and `electronize start /watch` worked smoothly as the old days :) Hope this will help someone else who has the same problem as I do.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#661