I've spent days trying to resolve the cause of this with no avail.
I've built a topshelf service, that runs fine from the command line, or even if I simply launch the exe from windows explorer.
However, once installed as a service, any attempt to start it then results in this:
[Success] Name Consumer.Service.NetFramework
[Success] ServiceName Consumer.Service.NetFramework
Topshelf v188.8.131.52, .NET Framework 4.8.4420.0 (4.0.30319.42000)
Topshelf.Hosts.StartHost Error: 0 : The service failed to start., System.InvalidOperationException: Cannot start service Consumer.Service.NetFramework on computer '.'. ---> System.ComponentModel.Win32Exception: The service did not respond to the start or control request in a timely fashion
--- End of inner exception stack trace ---
at System.ServiceProcess.ServiceController.Start(String args)
at Topshelf.Runtime.Windows.WindowsHostEnvironment.StartService(String serviceName, TimeSpan startTimeOut)
I've tried changing the permissions as well as just about anything I can think of, but nothing allows it to run.