WIX: Duplicate symbol 'Property:WixUI_Mode' found, Custom Dialog creation

坚强是说给别人听的谎言 提交于 2019-12-24 08:27:36

问题


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




回答3:


I also have this error. It happens because of a collision with InstallUISequence. If you have the same rule, try to change the condition.

For example: In I have:

<Show Dialog="WelcomeDlgCustom" Before="MyDlg" Overridable="yes">(NOT Installed AND NOT PREVIOUS_VERSION) OR PATCH</Show>

and in the same wxs file, I have:

<Publish Dialog="DbUpgradeWarningDlg" Control="Back" Event="NewDialog" Value="WelcomeDlgCustom">1</Publish>

So I just add some condition to break the collision & added Order="1", I change it to:

<Publish Dialog="DbUpgradeWarningDlg" Control="Back" Event="NewDialog"
> Value="WelcomeDlgCustom" Order="1">PATCH AND BUILD</Publish>


来源:https://stackoverflow.com/questions/46767144/wix-duplicate-symbol-propertywixui-mode-found-custom-dialog-creation

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!