gpt4 book ai didi

wix - 错误 CNDL0199 : The Wix element has an incorrect namespace of 'http://schemas.microsoft.com/wix/2003/01/wi'

转载 作者:行者123 更新时间:2023-12-02 04:27:53 25 4
gpt4 key购买 nike

我将我的 WIX 项目从 V2 迁移到 V4,然后更改了 .WXS 文件中的命名空间

我替换了下面的命名空间

<Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi">

<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">

在运行构建安装程序时进行更改后,出现以下错误:

error CNDL0199 : The Wix element has an incorrect namespace of
'http://schemas.microsoft.com/wix/2003/01/wi'. Please make the Wix element
look like the following: <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
E:\Code\EMR\Wix\src\EMR_Registry_entries.wx

我替换了新的命名空间,但它没有反应。一旦我运行构建安装程序,它就会使用旧的命名空间进行设置。我尝试了多次,但它总是设置旧的命名空间。

请帮我解决这个问题。

最佳答案

UPDATE: Question that came up from a second read of your question.

Source Control: "Once I run the build installer it is setting with the old namespace." - are you sure the build process doesn't auto-magically 1) check the WiX source out of your source control system? Or 2) maybe it is doing some XML manipulation via the automation script?


WiX 版本:您确定使用 WiX 4 进行编译吗?也许您无意中使用了 WiX 2WiX 3 进行编译?尝试在您的构建系统中对 WiX 二进制文件的完整路径进行硬编码——如果您有的话。请看这个(Sean 是一名 WiX 开发人员):Migrate Wix Project to version 4.0 . 坦率地说,我不确定 WiX 在同一个机器上结合迁移源处理多版本安装的效果如何(不同版本的同名二进制文件 - WiX 2、3、4 - 通过 PATH 变量全局适用?不确定)。

Visual Studio/Cmd.exe?:您是使用 Visual Studio 还是通过命令行进行编译? (我不太确定阅读你的问题)。也许try via the command line (向底部)如果您使用的是 Visual Studio - 反之亦然。确保您使用正确的 WiX 二进制文件(即 WiX 4)。

链接文件?:我没有要迁移的任何 WiX 2 源,但我想知道您是否有多个相互关联的源文件。这在 WiX 2 中甚至可能吗?我不记得了。无论哪种情况,我都会确保您已经更新了在构建过程中引入的所有 WiX 源文件。请仔细阅读日志。也许尝试使用 Candle.exe 直接使用命令行编译它们(cmd.exe 而不是 Visual Studio) 查看文件是否编译正常。

Source Files?:如果还是不行,请把源文件放到网上,我们看看。以 Github.com 为例。快速查看源代码(真正的 McCoy)有时会有很长的路要走 - 有时它根本没有帮助。也许试一试。 经过编辑的来源 很好 - 甚至受到鼓励。请密切关注敏感数据:How do I avoid distributing sensitive information in my MSI by accident? (这也适用于已发布的源文件 - 显然 - 不仅仅是编译的 MSI 及其帮助文件 - 例如静默安装模板批处理文件)。


In summary: That became a lot of babble. Maybe first try to compile the migrated WiX source with the right WiX 4 binaries to determine if that works or not. Then work backwards to figure out what happens during the build process.

关于wix - 错误 CNDL0199 : The Wix element has an incorrect namespace of 'http://schemas.microsoft.com/wix/2003/01/wi' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52152331/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com