WiX从v3升级到v6后日志出现BottomLine控件越界错误
WiX v3升级至v6后出现DEBUG: Error 2826控件边界溢出问题
近期将WiX Toolset安装程序从v3版本升级到v6版本,整体过程顺利,但执行日志生成命令:
msiexec /i setup.msi /l*v setup.log
后,日志中出现多条以DEBUG: Error 2826:为前缀的错误,具体内容如下:
Control BottomLine on dialog PrepareDlg extends beyond the boundaries of the dialog to the right by 4 pixels
Control BottomLine on dialog WelcomeEulaDlg extends beyond the boundaries of the dialog to the right by 4 pixels
Control BottomLine on dialog ProgressDlg extends beyond the boundaries of the dialog to the right by 4 pixels
Control BottomLine on dialog ExitDialog extends beyond the boundaries of the dialog to the right by 4 pixels
问题修复方案
这类错误属于UI布局的DEBUG级警告,不会影响安装程序核心功能,但会造成日志冗余。根源是WiX v6对默认对话框尺寸或控件默认属性做了调整,导致原v3中定义的BottomLine控件宽度超出了v6对话框的边界。
可以通过以下方式解决:
- 调整控件宽度:找到WiX代码中对应对话框(PrepareDlg、WelcomeEulaDlg、ProgressDlg、ExitDialog)的
BottomLine控件定义,将其Width属性减少4像素,确保控件右边缘与对话框边界对齐。 - 复用v6默认控件:如果使用的是WiX内置对话框,直接替换为v6版本的默认对话框控件定义,无需手动调整尺寸。
内容的提问来源于stack exchange,提问作者Mike Williams
相关产品推荐
相关产品推荐

