2

我正在使用第 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.
4

1 回答 1

1

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

于 2012-05-30T12:15:17.260 回答