装配加载问题

时间:2010-01-18 06:25:17

标签: .net assemblies runtime-error

当我从Vista(32位)转换为Windows 7(32位)时,我出现了装配加载问题。当我尝试加载一些非常旧的Sybase ASE ADO.NET数据提供程序DLLS时,会发生这种情况。

融合日志查看器中的日志显示:

    *** Assembly Binder Log Entry  (18/01/2010 @ 5:00:38 PM) ***

The operation failed.
Bind result: hr = 0x80131018. No description available.

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\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 = sybdrvado11
 (Partial)
LOG: Appbase = file:///C:/dev/AgentDesktop/ui/newweb/
LOG: Initial PrivatePath = C:\dev\AgentDesktop\ui\newweb\bin
LOG: Dynamic Base = C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\newweb\f57489cf
LOG: Cache Base = C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\newweb\f57489cf
LOG: AppName = d293c3e5
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\dev\AgentDesktop\ui\newweb\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v2.0.50727\Aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/newweb/f57489cf/d293c3e5/sybdrvado11.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/newweb/f57489cf/d293c3e5/sybdrvado11/sybdrvado11.DLL.
LOG: Attempting download of new URL file:///C:/dev/AgentDesktop/ui/newweb/bin/sybdrvado11.DLL.
LOG: Assembly download was successful. Attempting setup of file: C:\dev\AgentDesktop\ui\newweb\bin\sybdrvado11.dll
LOG: Entering download cache setup phase.
ERR: Error extracting manifest import from file (hr = 0x80131018).
ERR: Setup failed with hr = 0x80131018.
ERR: Failed to complete setup of assembly (hr = 0x80131018). Probing terminated.

我花了相当多的时间来搜索这个以及通过ASP.NET显示的错误消息,并且没有一个常见的解决方案似乎是相关的。我注意到有一种方法可以使用病毒检查程序导致此错误。是否可以在原始的Windows 7机器上执行此操作?即是否有任何类型的保护系统会干扰装配?

VS.NET 2008和VS.NET 2010 beta 2都失败了。

任何线索都会非常感激。

3 个答案:

答案 0 :(得分:2)

要将Sybase ASE ADO.NET与sybdrvado11.dll一起使用,您需要另一个文件:MSVCR71.dll 也许Windows\System32中缺少它?

答案 1 :(得分:2)

我在使用资源管理器的GAC文件夹中解决了我的问题。我能看到 system.runtime.serialization dll但是当我在此使用cmd提示时 文件夹dll存在于GAC_MSIL而不是GAC上。所以我复制了 GAC上的GAV_MSIL之后的System.Runtime.Serialization文件夹 重启VS我的项目完美编译。

为了方便地移动dll,我在cmd.exe中使用了以下命令:

cd\windows\assembly
attrib -r -h -s desktop.ini
ren desktop.ini desktop.bak

现在我可以在资源管理器中正常打开GAC文件夹,您可以看到实际的结构。

答案 2 :(得分:0)

尝试加载C:\dev\AgentDesktop\ui\newweb\bin\sybdrvado11.dll时似乎发生了问题。

这是Sybase ADO.NET提供程序所需的非托管DLL,通常应安装在PATH的某个位置。