zoukankan      html  css  js  c++  java
  • 关于“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_testWebApiTestin
    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_testWebApiTestweb.config
    LOG: Using host configuration file: C:WindowsMicrosoft.NETFramework64v4.0.30319aspnet.config
    LOG: Using machine configuration file from C:WindowsMicrosoft.NETFramework64v4.0.30319configmachine.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

  • 相关阅读:
    WPF : ListBox的几种Template属性
    提问的角度 5W1H,GRETT
    软件=科学+技术+工程, 软件的成败, 软件开发的首要任务
    软件的几个问题
    体会
    "复述一遍"是沟通的好办法
    WCF客户端调用IIS上WebService的安全问题
    C#处理chart
    js获取asp.net服务器端控件的值Demo
    SQL Server的复合索引适当用法
  • 原文地址:https://www.cnblogs.com/Summerppp/p/12427819.html
Copyright © 2011-2022 走看看