WIX: Duplicate symbol 'Property:WixUI_Mode'

2019-08-02 18:41发布

问题:

I have version 3.14 of Wix toolset and VS2017 and the following problem... when i'm trying get my own dialog order using predefined WixUI_Minimal. Same problem was in 3.11 toolset

  1. Step Create Wix project in VS2017
  2. Copy WixUI_Minimal.wxs from .\wix3-develop\wix3-develop\src\ext\UIExtension\wixlib
  3. Rename file WixUI_Minimal.wxs to Custom_Minimal.wxs and include into project
  4. Change in Custom_Minimal.wxs:

    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Fragment> <UI Id="Custom_Minimal">

  5. Add Custom_Minimal ref to Product.wxs:

    <Product Id="398c09df-6b61-4b0b-bf18-075a0bb98300" Name="SetupProject2" Language="1033" Version="1.0.0.0" Manufacturer="STH" UpgradeCode="524cff23-7bce-4078-9fb9-51b2eb7a844c"> <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> <UIRef Id="Custom_Minimal" />

  6. Trying to build but lot of errors:

    Severity Code Description Project File Line Suppression State Error Duplicate symbol 'Property:WixUI_Mode' 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. SetupProject3 C:\Users\...\source\repos\MtPubSubExample-mt3\SetupProject3\Custom_Minimal.wxs 28

and much more similar...

Anyone know why this is happening??

回答1:

I know this is old but I was just running into the same issue and it was very frustrating.

Seems that including the same <InstallUISequence> in your custom UI and using a Wix defined Dialog will somehow bring in one of the UI's that also has the <InstallUISequence> with that same dialog.

In the case of WixUI_Minimal you probably had

<InstallUISequence>
     <Show Dialog="WelcomeDlg" Before="WelcomeEulaDlg">Installed AND PATCH</Show>
     <Show Dialog="WelcomeEulaDlg" Before="ProgressDlg">NOT Installed</Show>
</InstallUISequence>

Included in your custom UI wxs. You can get around this by either defining your own WelcomeDlg and WelcomeEulaDlg (with modified names) and use them instead of the wix versions.

Or you can remove the <InstallUISequence> from the UI. I thought I might have to add an order but it seems to already use the "WelcomeDlg" first so just removing the <InstallUISequence> was enough. I just had to update the publish Event for the new window so it would properly move on to the next dialog when clicking next/back.



回答2:

Also had issues with the Minimal theme, instead try the WixUI_InstallDir which doesnt have the InstallUISequence flag and was easy to modify



标签: wix3.11