我正在调试程序集加载问题,所以我正在查看融合日志。有时他们让我感到困惑,因为他们从指示失败开始,然后最后他们说程序集从我期望加载的位置加载。
“操作失败”后跟“从...加载的 IL 程序集”的真正含义是什么?是加载程序集失败,还是成功了?
*** Assembly Binder Log Entry (2012-03-16 @ 10:25:14) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Program\MyCorp\MyApplication1.2.0.0\MyApplication.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = VIRTUALXP-63912\XPMUser
LOG: DisplayName = MyCorp.MyApplication.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///C:/Program/MyCorp/MyApplication1.2.0.0/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = MyApplication.exe
Calling assembly : MyApplication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: Start binding of native image MyCorp.MyApplication.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
WRN: No matching native image found.
LOG: IL assembly loaded from C:\Program\MyCorp\MyApplication1.2.0.0\MyCorp.MyApplication.Core.dll.
即使程序退出时,我也会看到这种程序集日志can't load file or assembly SomeAssembly or one of its dependencies
。根据与上述类似的日志条目加载有问题的程序集。
这是否表明未找到程序集的本机依赖项?我是否需要更改日志设置以查看哪个本机依赖项失败,或者我还能做些什么?