.NET Windows Service from dll

一个人想着一个人 提交于 2019-12-11 12:01:57

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/5362514/net-windows-service-from-dll

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!