我的.wxs文件有一个这样的片段
<Directory Id="UDPMonitorFiles" Name="UDP Monitor">
<Component Id="UDPMonitorFiles" Guid="*">
<File Id="UDP_UDPMonitor.exe"
Source="$(var.UDP Monitor.TargetDir)\UDP Monitor.exe"/>
<File Id="UDP_UDPMonitor.exe.config"
Source="$(var.UDP Monitor.TargetDir)\UDP Monitor.exe.config"/>
<ServiceInstall
Id="UDPServiceInstaller"
Type="ownProcess"
Vital="yes"
Name="DiskManagement"
DisplayName="Epicentral UDP Monitor"
Description="Epicentral UPD Printer Monitoring Service"
Start="demand"
Account="LocalSystem"
ErrorControl="ignore"
Interactive="no">
</ServiceInstall>
</Component>
</Directory>
<Directory Id="S2SCallerServiceFiles" Name="S2S Caller Service">
<Component Id="S2SCallerServiceFiles" Guid="*">
<File Id="S2SCallerService.exe"
Source="$(var.S2SCallerService.TargetDir)\S2SCallerService.exe"/>
<File Id="S2SCallerService.exe.config"
Source="$(var.S2SCallerService.TargetDir)\S2SCallerService.exe.config"/>
<File Id="S2S.xml"
Source="$(var.S2SCallerService.TargetDir)\S2S.xml"/>
<File Id="S2S_log4net.dll"
Source="$(var.S2SCallerService.TargetDir)\log4net.dll"/>
<ServiceInstall
Id="S2SCallerServiceInstaller"
Type="ownProcess"
Vital="yes"
Name="DiskManagement"
DisplayName="Epicentral S2S Caller Service"
Description="Epicentral S2S Caller Service"
Start="demand"
Account="LocalSystem"
ErrorControl="ignore"
Interactive="no">
</ServiceInstall>
</Component>
</Directory>
<Directory Id="HealthWatcherServiceFiles" Name="Health Watcher Service">
<Component Id="HealthWatcherServiceFiles" Guid="*">
<File Id="HealthWatcherService.exe"
Source="$(var.HealthWatcherService.TargetDir)\HealthWatcherService.exe"/>
<File Id="HealthWatcherService.exe.config"
Source="$(var.HealthWatcherService.TargetDir)\HealthWatcherService.exe.config"/>
<ServiceInstall
Id="HealthWatcherServiceInstaller"
Type="ownProcess"
Vital="yes"
Name="DiskManagement"
DisplayName="Epicentral Health Watcher Service"
Description="Epicentral Health Watcher Service"
Start="demand"
Account="LocalSystem"
ErrorControl="ignore"
Interactive="no">
</ServiceInstall>
</Component>
</Directory>它只注册了一个服务,尽管有3个项目有自己的条目。如果我注释掉安装(HealthWatcherServiceInstaller)的那个,那么S2SCallerServiceInstaller将被注册。
知道怎么会发生这种事吗?
发布于 2014-09-25 00:20:00
ServiceInstall/@Name属性是服务的名称。您已经将所有服务设置为同名。您需要为每个服务指定不同的名称。
https://stackoverflow.com/questions/25923769
复制相似问题