关于“Failed to complete setup of assembly(hr = 0x80131040). Probing terminated”

场景:动态库UFileDev(运行时版本v4.0.30319)内置方法调用了动态库ICSharpCode.SharpZipLib(运行时版本v2.0.50727)。调用动态库UFileDev过程中一直报错如下:

=== Pre-bind state information ===
LOG: DisplayName = ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73
(Fully-specified)
LOG: Appbase = file:///G:/program_test/WebApiTest/
LOG: Initial PrivatePath = G:\program_test\WebApiTest\bin
Calling assembly : UFileDev, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a7bcd44e2dce6fe6.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: G:\program_test\WebApiTest\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/webapitest/3f0358dc/ff934c92/ICSharpCode.SharpZipLib.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/webapitest/3f0358dc/ff934c92/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.DLL.
LOG: Attempting download of new URL file:///G:/program_test/WebApiTest/bin/ICSharpCode.SharpZipLib.DLL.
WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

解决方案:

  1. 修改app.config:

    添加

  1. 查看动态库UFileDev属c#教程性“强名称”是否为true,应为FALSE。

关于强名称的程序集介绍参考https://www.cnblogs.com/luminji/archive/2010/10/21/1857339.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值