Migrating from Wix 2 to Wix 3: Duplicate Symbols

1.1k views Asked by At

I am totally new to WiX, so of course my first task with WiX is to migrate an existing large installation program from WiX 2 to WiX 3. I've had a number of wrinkles most of which have been sorted, but I would be grateful for some suggestions with the following light errors. Since I am new to WiX, I want to list my whole process:

To create a WiX library:

candle.exe *.wxs  
lit.exe -out "wixui_company.wixlib" *.wixobj

To generate the main MSI:

candle.exe main.wxs -o main.wixobj  
light.exe main.wixobj -o Main_Installer.msi wixui_company.wixlib -ext WixUIExtension

This last command gives dozens and dozens of errors, but they all take the following form

error LGHT0091 : Duplicate symbol 'Dialog:LicenseAgreementDlg' found.

I have grep and re-greped, but the only references are the following:

In LicenseAgreementDlg.wxs:

<Fragment>  
    <UI>  
        <Dialog Id="LicenseAgreementDlg" ...

And in wixui_company.wxs

<Fragment>  
    <UI Id="WixUI">  
          <DialogRef Id="LicenseAgreementDlg" />  
...
          <Property Id="WixUI_WelcomeDlg_Next" Value="LicenseAgreementDlg" />

It is the DialogRef line that gives the error.

These both get referenced from wixui_company.wixlib in the main.wxs:

<UIRef Id="WixUI" />

FWIW, if I change either the ref to WixUI or the ref to LicenseAgreementDlg, duplicate errors go away, but instead I get symbol not found link errors. I migrated the original wxs files using WixCop, but under WiX 2 they all worked as is. I am guessing that this has to do with the move to put WiXUI in it's own namespace in WiX 3, but frankly I have no idea what to even try.

Any ideas on where things went horribly wrong?

Thanks,

Adam

1

There are 1 answers

0
Stephen Jennings On

"LicenseAgreementDlg" is the name of a dialog in the WixUIExtension that you're linking to with light.exe. Every dialog in an MSI database must have a unique identifier, so it's likely you've made a <UIRef> element to one of the standard WiX UIs ("WixUI_FeatureTree", "WixUI_Mondo", etc.), which includes WiX's LicenseAgreeementDlg dialog. You're then referencing your own LicenseAgreementDlg, so now you have two dialogs with the same name.

In this situation, you'd need to either rename your own LicenseAgreementDlg or remove it altogether and use the built-in one.