1

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!

1 Answers1

1

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

Bob Arnson
  • 21,377
  • 2
  • 40
  • 47
  • `Registry` elements are generated by RegPkg.exe. Are there any solutions except rewriting this file with some external script? – Evgeny Baram Dec 29 '16 at 06:20
  • RegPkg.exe would need to explicitly support modern versions of WiX. It originally supported WiX v2.0 and hasn't kept up. – Bob Arnson Dec 29 '16 at 17:27