从 WiX 3.10 迁移到 WiX 4.0:未处理的扩展元素 [英] Migrating from WiX 3.10 to WiX 4.0: unhandled extension element
问题描述
我正在从 WiX Toolset 3.10 迁移到 4.0-pre.更新 命名空间 没问题,但我我的 NAnt 构建日志中仍然出现一些错误.
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.
我有 Installer.wxs 文件:
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>
VS2012Package.wxi.bak 文件是通过 RegPkg.exe 生成的:
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.
我尝试添加命名空间 'http://wixtoolset.org/schemas/v4/wxs' 到<包括>"VS2012Package.wxi.bak 中的标记在构建之前使用外部脚本,但错误只是更改为 error CNDL0005 : The Component element contains an unexpected child element 'Registry'
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'
感谢您的帮助!
推荐答案
Registry
元素在 WiX v3.x 中已弃用,在 WiX v4.x 中已过时.改用 RegistryValue
.
The Registry
element was deprecated in WiX v3.x and is obsoleted in WiX v4.x. Use RegistryValue
instead.
这篇关于从 WiX 3.10 迁移到 WiX 4.0:未处理的扩展元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!