2012-03-02 125 views
2

我收到以下异常,尝试为.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. 

有没有人知道可能是什么问题?

+0

问题被再现 “有时”。几分钟后,同一个项目就没有做任何修改就建成了。 – ideafixxxer 2012-03-02 12:20:44

回答

0

wix二进制文件wix.dll存在问题。奇怪的部分是有一段时间它正在工作,有些时候它失败了。为了解决这个程序集需要在操作代码之后构建的问题。下面是我遵循的步骤来解决问题:

  1. 从'http://sourceforge.net/'网站下载代码。
  2. 在VS 2010环境中构建代码。
  3. 通过执行以下操作更正SummaryInformation.SetProperty代码。 a。首先收集长变量中的高位和低位字节,而不是直接转换为int。 b。添加这种方法的特殊处理。
  4. 添加程序集版本2.0.5805.0。
  5. 添加程序集文件版本2.0.5805.0。
  6. 使用VS 2010构建wix.dll程序集。
  7. 更改公钥和公钥标记,因为它存在于下载二进制wix.dll文件中。
  8. 在我们的项目中复制新版本wix.dll,它开始工作。

问候 Navanit Katiyar GlobalLogic私人有限公司

相关问题