【问题标题】:Assembly Binding Failing for 3rd party dll第 3 方 dll 的程序集绑定失败
【发布时间】:2012-06-05 21:48:23
【问题描述】:

我正在使用第 3 方 DLL。 dll 没有强名称,所以我对其进行了签名。我将签名的 DLL 粘贴到我的应用程序的 Layouts Mapped 文件夹中并添加了参考。在运行时,我收到此 DLL 的文件未找到异常。我使用 fuslogvw 来跟踪程序集绑定失败日志。我将粘贴在下面请指导我。我是 .net 的新手

*** Assembly Binder Log Entry  (5/30/2012 @ 5:12:13 PM) ***

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
Running under executable  c:\windows\system32\inetsrv\w3wp.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: User = NT AUTHORITY\NETWORK SERVICE
LOG: DisplayName = ExcelLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b182d73c05ed7959
 (Fully-specified)
LOG: Appbase = file:///C:/inetpub/wwwroot/wss/VirtualDirectories/2000/
LOG: Initial PrivatePath = C:\inetpub\wwwroot\wss\VirtualDirectories\2000\bin
LOG: Dynamic Base = C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\4782bf2e
LOG: Cache Base = C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\4782bf2e
LOG: AppName = cf0ac865
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\inetpub\wwwroot\wss\VirtualDirectories\2000\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/4782bf2e/cf0ac865/ExcelLibrary.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/4782bf2e/cf0ac865/ExcelLibrary/ExcelLibrary.DLL.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/2000/bin/ExcelLibrary.DLL.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/2000/bin/ExcelLibrary/ExcelLibrary.DLL.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/2000/_app_bin/ExcelLibrary.DLL.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/2000/_app_bin/ExcelLibrary/ExcelLibrary.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/4782bf2e/cf0ac865/ExcelLibrary.EXE.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/4782bf2e/cf0ac865/ExcelLibrary/ExcelLibrary.EXE.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/2000/bin/ExcelLibrary.EXE.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/2000/bin/ExcelLibrary/ExcelLibrary.EXE.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/2000/_app_bin/ExcelLibrary.EXE.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/2000/_app_bin/ExcelLibrary/ExcelLibrary.EXE.
LOG: All probing URLs attempted and failed.

【问题讨论】:

    标签: asp.net .net .net-assembly


    【解决方案1】:

    看起来您正试图在 64 位系统上绑定 32 位第 3 方本机 DLL。注册 DLL 的 x64 版本或更改要为 x86 目标编译的项目。

    【讨论】:

    • 你能告诉我如何注册 DLL 的 x64 版本吗?
    • 首先,您必须告诉我们确切的配置。您是否正在为“AnyCPU”目标构建您的项目?你的系统是 64 位的吗?你有关于 3rd-party DLL 的信息吗? (使用 CFFExplorer 查看它是 32 位还是 64 位)。更重要的是,DLL 本身是本机库还是托管程序集?
    • 我正在为“AnyCPU”构建,我的系统是 64 位的。我不太了解第三方dll。这是我正在使用的 dll code.google.com/p/excellibrary.
    • 哦,不仅仅是使用 x64 目标从源代码重新编译 DLL(转到配置管理器,在加载 .csproj 后在那里创建 x64 目标)
    猜你喜欢
    • 1970-01-01
    • 2015-11-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-08-02
    相关资源
    最近更新 更多