C
C#6mo ago
XumXum

Good morning guys, I'm having a problem with my program service worker.

Good morning guys, I'm having a problem with my program. I'm trying to create a service worker for win. When I publish and register in msc and try to start the program, win always returns that it cannot start or that the program does not start in a long time. Someone help me. I'm using .net core;
10 Replies
Omnissiah
Omnissiah6mo ago
did you use the service classes or is this just a normal executable
XumXum
XumXumOP6mo ago
GitHub
GitHub - MarcosSarges/servicework
Contribute to MarcosSarges/servicework development by creating an account on GitHub.
XumXum
XumXumOP6mo ago
@not guilty I'm using the service class, I generated the project from a template.
Omnissiah
Omnissiah6mo ago
there is no use of windows service class there 😐
XumXum
XumXumOP6mo ago
No description
No description
No description
Omnissiah
Omnissiah6mo ago
the main program must inherit from System.ServiceProcess.ServiceBase that's what is managing the switches given when executing a program like a service and there you implement OnStart
XumXum
XumXumOP6mo ago
enters my program, do I have to create the main method and inherit from this class you mentioned?
XumXum
XumXumOP6mo ago
like this?
No description
Omnissiah
Omnissiah6mo ago
it should be written in the help i believe you should call ServiceBase.Run(yourService)
XumXum
XumXumOP6mo ago
ok ok I think I understand. :PatrickChad:
Want results from more Discord servers?
Add your server