当前位置: 移动技术网 > IT编程>开发语言>c# > 关于“Failed to complete setup of assembly(hr = 0x80131040). Probing terminated”

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

2020年03月09日  | 移动技术网IT编程  | 我要评论
场景:动态库UFileDev(运行时版本v4.0.30319)内置方法调用了动态库ICSharpCode.SharpZipLib(运行时版本v2.0.50727)。调用动态库UFileDev过程中一直报错如下: Pre-bind state information LOG: DisplayName ...

  场景:动态库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。

  关于强名称的程序集介绍参考

 

如您对本文有疑问或者有任何想说的,请点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网