Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Duplicate symbol 'WixAction:InstallExecuteSequence/RemoveExistingProducts' found. This typically means that an Id is duplicated

I am developing an installer project using WiX 3.9 toolset. I am trying to uninstall the previous version during the install of a new version. I tried the below one in product.wxs,

<Product Id="*" Name="WIXDemoApp" Language="1033" Version="1.0.0.0" Manufacturer="Man name" UpgradeCode="993d89e6-07ec-4d33-abc5-957360bc66e1">
    <Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
    <Upgrade Id="89CF8BE7-05EE-4C7E-9EFC-0249DD260EBB">
        <UpgradeVersion
           Minimum="1.0.0.0" Maximum="99.0.0.0"
           Property="PREVIOUSVERSIONSINSTALLED"
           IncludeMinimum="yes" IncludeMaximum="no" />
    </Upgrade>

    <Upgrade Id="89CF8BE7-05EE-4C7E-9EFC-0041DD260EBB">
        <UpgradeVersion
          Minimum="1.0.0.0" Maximum="99.0.0.0"
          Property="PREVIOUSVERSIONSINSTALLED"
          IncludeMinimum="yes" IncludeMaximum="no" />
    </Upgrade>

    <InstallExecuteSequence>
        <RemoveExistingProducts Before="InstallFinalize" />
    </InstallExecuteSequence>
</Product>

I am getting this error:

error LGHT0091: Duplicate symbol 'WixAction:InstallExecuteSequence/RemoveExistingProducts' found. This typically means that an Id is duplicated. Check to make sure all your identifiers of a given type (File, Component, Feature) are unique.`

What was the problem and how do I fix it?

like image 494
user2681579 Avatar asked Nov 17 '14 10:11

user2681579


2 Answers

The most likely problem is, like the error stated, you have a "Duplicate Symbol"


I noticed-- two Properties are labeled PREVIOUSVERSIONSINSTALLED, and another one has an ID also labeled PREVIOUSVERSIONSINSTALLED


WiX could be confusing the two of your Upgrade IDs, seeing as the only difference between them are the numbers 0249 and 0041


Beyond those, your code shouldn't have any problems-- Then again, you didn't provide all of your code, so there is possibly one or more duplicates, like the error said.

like image 88
Momoro Avatar answered Nov 16 '22 03:11

Momoro


The Upgrade element schedules the RemoveExistingProducts action for you. Remove RemoveExistingProducts from your InstallExecuteSequence and the error should go away. https://wixtoolset.org/documentation/manual/v3/howtos/updates/major_upgrade.html

Upgrade uninstalls detected versions by default. If you only want to store the ids of installed versions in a property add the attribute OnlyDetect="yes". https://wixtoolset.org/documentation/manual/v3/xsd/wix/upgradeversion.html

like image 32
scaler Avatar answered Nov 16 '22 04:11

scaler