从WiX 3.10迁移到WiX 4.0:未处理的扩展元素

时间:2016-12-28 03:14:01

标签: wix

我从WiX Toolset 3.10迁移到4.0-pre。更新namespaces没问题,但我的NAnt构建日志中仍然出现了一些错误。

我有Installer.wxs文件:

<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>

通过RegPkg.exe生成VS2012Package.wxi.bak文件:

<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>
...

我的构建失败了,出现了这样的错误:

[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.

我尝试添加名称空间&#39; http://wixtoolset.org/schemas/v4/wxs&#39; to&#34;&lt; Include&gt;&#34;在构建之前使用外部脚本在VS2012Package.wxi.bak中标记,但错误只是更改为error CNDL0005 : The Component element contains an unexpected child element 'Registry'

感谢您的帮助!

1 个答案:

答案 0 :(得分:1)

WiX v3.x中不推荐使用Registry元素,在WiX v4.x中已废弃。请改用RegistryValue

相关问题