WiX light.exe抛出导致溢出异常的算术运算
问题描述:
我收到以下异常,尝试为.NET应用程序构建msi文件。WiX light.exe抛出导致溢出异常的算术运算
----------+++ Linking d:\analytics\trunk\bin64\snapshot.msi
light.exe : error LGHT0001 : Arithmetic operation resulted in an overflow.
Exception Type: System.OverflowException
Stack Trace:
at Microsoft.Tools.WindowsInstallerXml.Msi.SummaryInformation.SetProperty(Int32 index, Object property)
at Microsoft.Tools.WindowsInstallerXml.Binder.UpdateSummaryInfo(Database db)
at Microsoft.Tools.WindowsInstallerXml.Binder.GenerateDatabase(Output output)
at Microsoft.Tools.WindowsInstallerXml.Binder.Bind(Output output)
at Microsoft.Tools.WindowsInstallerXml.Tools.Light.Run(String[] args)
Command returned non zero code - 1.
有没有人知道可能是什么问题?
答
wix二进制文件wix.dll存在问题。奇怪的部分是有一段时间它正在工作,有些时候它失败了。为了解决这个程序集需要在操作代码之后构建的问题。下面是我遵循的步骤来解决问题:
- 从'http://sourceforge.net/'网站下载代码。
- 在VS 2010环境中构建代码。
- 通过执行以下操作更正
SummaryInformation.SetProperty
代码。 a。首先收集长变量中的高位和低位字节,而不是直接转换为int。 b。添加这种方法的特殊处理。 - 添加程序集版本2.0.5805.0。
- 添加程序集文件版本2.0.5805.0。
- 使用VS 2010构建wix.dll程序集。
- 更改公钥和公钥标记,因为它存在于下载二进制wix.dll文件中。
- 在我们的项目中复制新版本wix.dll,它开始工作。
问候 Navanit Katiyar GlobalLogic私人有限公司
问题被再现 “有时”。几分钟后,同一个项目就没有做任何修改就建成了。 – ideafixxxer 2012-03-02 12:20:44