1
我想生成僅包含一個功能的MSI軟件包。在wxi和wxs中使用WIX功能元素具有相同的ID
我有一個自動生成的wxi文件。我無法改變這個過程。
WXI文件看起來像這樣:
<?xml version="1.0" encoding="UTF-8" ?>
<Include>
<!-- components -->
<Feature Id="DefaultFeature" Title="Main Feature" Level="1">
<ComponentRef Id="comp0" />
<ComponentRef Id="comp1" />
<ComponentRef Id="comp2" />
<ComponentRef Id="comp3" />
<ComponentRef Id="CleanupMainApplicationFolder" />
</Feature>
</Include>
我有一個WXS文件,我可以改變:
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product ...>
<!-- components -->
<?include bundle.wxi ?>
<UI/>
<FeatureRef Id="DefaultFeature">
<ComponentRef Id="comp999" />
</FeatureRef>
</Product>
</Wix>
當我編譯WXS以MSI封裝的光指出這個錯誤:
error LGHT0095 : Multiple primary references were found for Feature 'DefaultFeature' in Product '{...}' and Product '{...}'.
如何更改我的wxs文件以將組件添加到wxi文件中定義的功能?
在此先感謝。
我無法更改wxi包含文件。這個包含文件是自動生成的。 –
嗯,在這種情況下,您可以指定'Feature =「DefaultFeature」'作爲這些額外組件的屬性,而不是添加具有相同ID的FeatureRef。 –