大马资讯论坛 - 马来西亚中文资讯平台

标题: [教学]Install Windows Service 错误Error-absence of a ServiceProcessInstaller [打印本页]

作者: 资讯王    时间: 2010-10-29 22:26
标题: [教学]Install Windows Service 错误Error-absence of a ServiceProcessInstaller
安装时错误 Exception:
System.InvalidOperationException: Installation failed due to the absence of a ServiceProcessInstaller. The ServiceProcessInstaller must either be the containing installer, or it must be present in the Installers collection on the same installer as the ServiceInstaller.

Solution:


使用ServiceInstaller、ServiceProcessInstaller控件来安装Service,在设计画面上按右键→加入安装程式,不用自己再写程式,VS真的是好用工具。如果找不到自己从toolbox托出来。

The ServiceInstaller automatically has its parent set to the Installer class but the ServiceProcessInstaller does not. You must manually set its parent property to the Installer class.

注意Note: 如果还是错误删除 installer class再加过。If still error, delete installer class and add it again

Exception:
System.ArgumentException: Must specify value for source.

Solution

The “ServiceName” property on the ServiceInstaller instance must be set.
这两个的parent要一样哦

更多:http://www.dotblogs.com.tw/yc421206/archive/2009/03/24/7675.aspx




欢迎光临 大马资讯论坛 - 马来西亚中文资讯平台 (http://www.freeinfo.com.my/) Powered by Discuz! X3.3