WiX MSMQ:Product元素包含一个意外的子元素'msmq:MessageQueue'

时间:2014-02-11 15:57:55

标签: xml windows wix installer windows-installer

我正在使用WiX MSMQ扩展来创建具有以下代码的队列:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:msmq="http://schemas.microsoft.com/wix/MsmqExtension">

<Product Id="*" Name="Blah" Language="1033" Version="2.0.0.0" Manufacturer="Blah Inc." UpgradeCode="{7FB782AF-178B-4705-893A-CE9B54EF54C0}">
<Package Id ="*" Keywords="Installer" Description="Blah Installer" Manufacturer="Blah Inc." InstallerVersion="200" Compressed="yes" InstallScope="perMachine" InstallPrivileges="elevated" />

<MajorUpgrade AllowDowngrades="yes" />   

<Property Id="HASMSMQ"> 
  <RegistrySearch Id="MSMQIsInstalled" Root="HKLM" Key="System\CurrentControlSet\Services\MSMQ" Name="ImagePath" Type="raw" /> 
</Property> 

<Condition Message="You must run the installer as administrator to install this product.">Privileged</Condition>
<Condition Message="The MSMQ service must be installed to install this product."><![CDATA[INSTALLED OR HASMSMQ]]></Condition>

<msmq:MessageQueue Id="Blah1" Label="Blah 1" Transactional="no" PrivLevel="none" PathName=".\Private$\Blah1" />
<msmq:MessageQueue Id="Blah2" Label="Blah 2" Transactional="no" PrivLevel="none" PathName=".\Private$\Blah2" />

但是,当我执行candle.exe -ext WixMsmqExtension Blah.wxs时出现错误:“CNDL0005:Product元素包含一个意外的子元素'msmq:MessageQueue'”

我不明白为什么,我有引用和命名空间。任何帮助,将不胜感激。提前谢谢。

1 个答案:

答案 0 :(得分:2)

msmq:MessageQueue必须是Component元素的子元素。您的消息队列将与父组件一起“安装”。组件的条件也将作为消息队列创建的条件。

有关详细信息,请参阅doc reference