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
did you use the service classes or is this just a normal executable
edit: my repo https://github.com/MarcosSarges/servicework/tree/master
GitHub
GitHub - MarcosSarges/servicework
Contribute to MarcosSarges/servicework development by creating an account on GitHub.
@not guilty I'm using the service class, I generated the project from a template.
there is no use of windows service class there 😐
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
enters my program, do I have to create the main method and inherit from this class you mentioned?
like this?
it should be written in the help
i believe you should call
ServiceBase.Run(yourService)
ok ok I think I understand. :PatrickChad: