我有一个Windows服务和服务安装的.NET类库(不是一个exe)里面。
I have a Windows Service and Service Installer inside of a .NET class library (not an exe).
在该服务通过installutil安装,尝试启动,我得到的错误
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
在谷歌上搜索,我发现这个错误可能是由于这样的事实,我的服务是一个DLL,而不是exe文件的一部分。难道这是问题吗?如果是这样,我怎么能解决这个问题?如果没有,还有什么可能是这个问题。
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.
推荐答案
在VS.NET到新项目/的Windows / Windows服务,覆盖的服务,并用自己的安装类。然后你可以使用installutil上编译EXE文件。有没有办法,你可以从一个.dll安装Windows服务
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
相关推荐
最新文章