我有两个产品Product1 & Product2。 Product1使用p1.dll &产品2使用p2.dll。
我已经为它们定义了独立的ComponentGroups,但是在同一个wxs文件(Groups.wxs)中。
我已将这些组件组包含在单独的功能F1 & F2(Feature.wxs)中。
然后为Product1.wxs中的F1和Product2.wxs中的F2提供FeatureRef,如下所示。
在我的构建系统中,我在bin文件夹中有p1.dll或p2.dll。
当我构建Product1的安装程序时,我的bin文件夹中只有p1.dll。
然而,当我建立产品1的安装程序,它抛出 - 错误LGHT0103:系统无法找到文件“.. \ BIN \ p2.dll”如何有选择地包含Wix Features
为什么要威克斯链接查找p2.dll当我Product1中没有提供F2的FeatureRef?
我该如何解决这个问题?
Groups.wxs:
<ComponentGroup Id="G1">
<Component Id="C1" DiskId="1" Directory="BIN" Guid="xxxx">
<File Id="C1" Name="p1.dll" Source="..\bin\p1.dll" />
</Component>
</ComponentGroup>
<ComponentGroup Id="G2">
<Component Id="C2" DiskId="1" Directory="BIN" Guid="yyyy">
<File Id="C2" Name="p2.dll" Source="..\bin\p2.dll" />
</Component>
</ComponentGroup>
Features.wxs:
<Feature Id="F1" Title="Feature1" Level="1">
<ComponentGroupRef Id="G1" />
</Feature>
<Feature Id="F2" Title="Feature2" Level="1">
<ComponentGroupRef Id="G2" />
</Feature>
Product1.wxs:
<FeatureRef Id="F1" />
Product2.wxs:
<FeatureRef Id="F2" />
Product1.wixproj
<ItemGroup>
<WixCode Include="$(WixCodeDir)\Groups.wxs" />
<WixCode Include="$(WixCodeDir)\Features.wxs" />
<WixCode Include="$(WixCodeDir)\Product1.wxs" />
</ItemGroup>
Product2.wixproj
<ItemGroup>
<WixCode Include="$(WixCodeDir)\Groups.wxs" />
<WixCode Include="$(WixCodeDir)\Features.wxs" />
<WixCode Include="$(WixCodeDir)\Product2.wxs" />
</ItemGroup>