You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用WiX v4 RC1构建MSI时遇WIX0001空值异常求助

WiX v4 RC1构建MSI安装包时触发Nullable object must have a value错误

我使用WiX v4 RC1构建MSI安装包,执行以下命令:

PS C:\temp> wix build .\Notepad.wxs -o .\Notepad.msi

之后出现如下错误:

wix.exe : error WIX0001: System.InvalidOperationException: Nullable object must have a value.
后续调用栈信息如下:
at System.Nullable`1.get_Value()
at WixToolset.Core.Compiler.ParseCustomActionElement(XElement node) in D:\a\wix4\wix4\src\wix\WixToolset.Core\Compiler.cs:line 3514
at WixToolset.Core.Compiler.ParsePackageElement(XElement node) in D:\a\wix4\wix4\src\wix\WixToolset.Core\Compiler_Package.cs:line 244
at WixToolset.Core.Compiler.ParseWixElement(XElement node) in D:\a\wix4\wix4\src\wix\WixToolset.Core\Compiler.cs:line 221
at WixToolset.Core.Compiler.Compile(ICompileContext context) in D:\a\wix4\wix4\src\wix\WixToolset.Core\Compiler.cs:line 131
at WixToolset.Core.CommandLine.BuildCommand.CompilePhase(IDictionary`2 preprocessorVariables, IEnumerable`1 sourceFiles, IReadOnlyCollection`1 includeSearchPaths, CancellationToken cancellationToken) in D:\a\wix4\wix4\src\wix\WixToolset.Core\CommandLine\BuildCommand.cs:line 191
at WixToolset.Core.CommandLine.BuildCommand.ExecuteAsync(CancellationToken cancellationToken) in D:\a\wix4\wix4\src\wix\WixToolset.Core\CommandLine\BuildCommand.cs:line 106
at WixToolset.Tools.Program.Run(IServiceProvider serviceProvider, IMessageListener listener, String[] args, CancellationToken cancellationToken) in D:\a\wix4\wix4\src\wix\wix\Program.cs:line 89
at WixToolset.Tools.Program.Main(String[] args) in D:\a\wix4\wix4\src\wix\wix\Program.cs:line 43

我已经通过wix convert工具转换并手动修正了WXS文件,确认文件本身没有问题,怀疑这是WiX v4 RC1版本的Bug。想了解是否有其他开发者遇到过相同的问题。

内容的提问来源于stack exchange,提问作者Michael Kiesel

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.05 23:50:14