打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
关于“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: 

    添加<startup>

    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>

     </startup>

2. 查看动态库UFileDev属性“强名称”是否为true,应为FALSE。

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

 

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
关于C#对文件的压缩和解压缩的问题
WebService传输DataSet的一点想法和实践
ICSharpCode.SharpZipLib生成tar、tar.gz
20200728-直接提取压缩包里的文件
Apache log4net Manual: Configuration
【CAD 批量打图精灵 6.4】带授权文件&多文档多格式打印
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服