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

 找回密码
 注册
搜索
打印 上一主题 下一主题

[教学]Install Windows Service 错误Error-absence of a ServiceProcessInstaller

[复制链接]
跳转到指定楼层
1#
发表于 2010-10-29 22:26:20 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
安装时错误 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

手机版|大马资讯论坛  

GMT+8, 2024-11-1 07:55 , Processed in 0.047343 second(s), 12 queries , File On.

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表