2

I have the Test.wxs code:

<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" 
         xmlns:ui="https://wixtoolset.org/schemas/v4/wxs/ui"
    <?define ProductVersion = "1.0.0.0" ?>
    <?define ManufacturerName = "Company Ltd." ?>
    <?define ManufacturerWebUrl ="http://www.aa.com" ?>
    <?define DefaultCompanyFolder= "Company" ?>
    <?define DefaultProductFolder= "Test" ?>
    <?define UpgradeCode= "{395fdcc2-c841-4d9e-ae66-9c2f7134ec0b}" ?>
    Package Name="!(loc.ProductName)"
        <Package Name="!(loc.ProductName)"
                     Language="!(loc.Language)"
                     Manufacturer="$(var.ManufacturerName)"
                     UpgradeCode="$(var.UpgradeCode)"
                     Version="$(var.ProductVersion)"
                     InstallerVersion="301">
        <MajorUpgrade AllowSameVersionUpgrades="yes" DowngradeErrorMessage="!(loc.DowngradeMessage)" Schedule="afterInstallInitialize" />
        <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" CompressionLevel="high" />
        <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="!(loc.RunAfterInstalation)" />
        <Property Id="WixShellExecTarget" Value="[#Text.exe]" />
        <CustomAction Id="LaunchApplication" DllEntry="WixShellExec" Impersonate="yes" BinaryRef="Wix4UtilCA_X64" />
        <?include InstallationStages.wxi?>
        <Property Id="WIXUI_INSTALLDIR" Value="MY_INSTALL_LOCATION" />
        <ComponentGroup Directory="MY_INSTALL_LOCATION" Id="ProductComponentGroup">
            <Component Id="Test.exe" Bitness="always64">
            </Component>
            <!--shortcut !!!!-->
            <ComponentRef Id="ApplicationShortcuts" />
            <!--shortcut !!!!-->
        </ComponentGroup>
        <CustomAction Id="OverwriteWixSetDefaultPerMachineFolder" Property="WixPerMachineFolder" Value="[MY_INSTALL_LOCATION]" Execute="immediate" />
        <CustomAction Id="SetARPINSTALLLOCATION" Property="ARPINSTALLLOCATION" Value="[MY_INSTALL_LOCATION]" />
        <InstallExecuteSequence>
            <Custom Action="SetARPINSTALLLOCATION" After="InstallValidate" />
        </InstallExecuteSequence>
        <UI Id="MyWixUI_InstallDir">
            <ui:WixUI Id="WixUI_InstallDir" />
        </UI>
        <UI >
            <Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication" Condition="WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed" />
        </UI>
        <Feature Id="HelloWorldFeature">
            <ComponentGroupRef Id="ProductComponentGroup" />
        </Feature>
    </Package>
</Wix>

I have wix version 6.0.0-rc.1+f181445 (wix --version) and WixToolset version 6.0.0-rc.1. When I try to run: wix build Test.wxs -ext ..\wixtoolset.ui.wixext\6.0.0-rc.1\wixext6\WixToolset.UI.wixext.dll I get the following error:

error WIX0200: The UI element contains an unhandled extension element 'WixUI'. Please ensure that the extension for elements in the 'https://wixtoolset.org/schemas/v4/wxs/ui' namespace has been provided.

I tried everything I could think of. Change version, uninstall wix, install but no result. Please advise

1 Answer 1

1

You've probably made a mistake in the wix.exe command-lines. That's the hard way to do things. Instead, use a .wixproj and dotnet build to simplify the process.

For example, add the following Test.wixproj in the same folder as your Test.wxs:

<Project Sdk='WixToolset.Sdk/6.0.0-rc.1'>
  <ItemGroup>
    <PackageReference Include='WixToolset.UI.wixext' Version='6.0.0-rc.1' />
  </ItemGroup>
</Project>

Then use dotnet build in the folder. It'll download the correct versions for all the tools and build the MSI to bin\Debug folder.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.