Migrating from WiX 3.10 to WiX 4.0: unhandled exte

2019-03-01 20:31发布

I'm migrating from WiX Toolset 3.10 to 4.0-pre. Updating namespaces went ok, but I'm still getting some errors in my NAnt build log.

I have Installer.wxs file:

<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" 
xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
<Product ...>
    <DirectoryRef Id="FolderCommon">
        ...
        <Component Id="Registration_Component_12" Guid="..." KeyPath="yes">
            <?include VS2012Package.wxi.bak?>
            ...
        </Component>
        ...
    </DirectoryRef>
    ...
</Product>

Where VS2012Package.wxi.bak file is generated via RegPkg.exe:

<Include>
<Registry Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\11.0\InstalledProducts\VsPackage">
    <Registry Name="Package" Value="..." Type="string" />
    <Registry Name="UseInterface" Value="1" Type="integer" />
</Registry>
...

And my build fails with errors like this:

[exec] ...\Installer\VS2012Package.wxi.bak(3) : error CNDL0200 : The Component element contains an unhandled extension element 'Registry'.  Please ensure that the extension for elements in the '' namespace has been provided.

I tried to add namespace 'http://wixtoolset.org/schemas/v4/wxs' to "<Include>" tag in VS2012Package.wxi.bak using external script before building, but errors just changed to error CNDL0005 : The Component element contains an unexpected child element 'Registry'

Thanks for any help!

标签: wix
1条回答
欢心
2楼-- · 2019-03-01 21:14

The Registry element was deprecated in WiX v3.x and is obsoleted in WiX v4.x. Use RegistryValue instead.

查看更多
登录 后发表回答