C
C#7mo 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
HtmlCompiler
HtmlCompiler7mo ago
did you use the service classes or is this just a normal executable
XumXum
XumXumOP7mo ago
GitHub
GitHub - MarcosSarges/servicework
Contribute to MarcosSarges/servicework development by creating an account on GitHub.
XumXum
XumXumOP7mo ago
@not guilty I'm using the service class, I generated the project from a template.
HtmlCompiler
HtmlCompiler7mo ago
there is no use of windows service class there 😐
XumXum
XumXumOP7mo ago
No description
No description
No description
HtmlCompiler
HtmlCompiler7mo 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
XumXumOP7mo ago
enters my program, do I have to create the main method and inherit from this class you mentioned?
XumXum
XumXumOP7mo ago
like this?
No description
HtmlCompiler
HtmlCompiler7mo ago
it should be written in the help i believe you should call ServiceBase.Run(yourService)
XumXum
XumXumOP7mo ago
ok ok I think I understand. :PatrickChad:
Want results from more Discord servers?
Add your server