【问题标题】:ExcelDataReader 3.4 - System.IO.FileLoadExceptionExcelDataReader 3.4 - System.IO.FileLoadException
【发布时间】:2018-06-18 14:37:40
【问题描述】:

我正在使用 ExcelDataReader 3.4,它在我的开发 PC 上运行良好,但在生产 PC 上使用时,我遇到了这个错误

System.IO.FileLoadException:无法加载文件或程序集“System.IO.Compression,Version=4.2.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089”或其依赖项之一。找到的程序集的清单定义与程序集引用不匹配。 (HRESULT 异常:0x80131040)

在我的项目中,我将 System.IO.Compression 复制到本地。
我正在使用 .NET 4.5,Visual Studio 2017

【问题讨论】:

    标签: exceldatareader fileloadexception system.io.compression


    【解决方案1】:

    我发现了问题。在我的 WPF 应用程序的 App.Config 中有那些行

    <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral"/>
        <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0"/>
      </dependentAssembly>
    </assemblyBinding>
    

    我更改了 4.0.0.0 的版本,现在它可以工作了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多