Jeff
Jeff

Reputation: 36603

.NET Windows Service from dll

I have a Windows Service and Service Installer inside of a .NET class library (not an exe).

Once the service is installed via installutil, when trying to start, I get the error

Windows could not start the xxx service on Local Computer  
Error 193: 0xc1

In googling I found that this error might be due to the fact that my service is part of a dll, not an exe. Could this be the problem? If so, how can I resolve the issue? If not, what else could be the problem.

Upvotes: 2

Views: 3023

Answers (1)

Stefan P.
Stefan P.

Reputation: 9519

In VS.NET go to New Project/Windows/Windows Service, overwrite the service and install classes with your own. Then you can use installutil on the compiled exe file. There is no way you can install a windows service from a .dll

Upvotes: 3

Related Questions