I am debugging an assembly loading problem, so I'm looking through fusion logs. Sometimes they confuse me because they begin with indicating a failure, then in the end they say the assembly loads from where I expect it to be loaded.
What does "The operation failed" followed by "IL assembly loaded from..." really mean? Did it fail to load the assembly, or did it succeed?
*** 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.
I also see this kind of log for an assembly even when the program exits stating can't load file or assembly SomeAssembly or one of its dependencies
. The assembly in question is loaded according to a log entry similar to the above.
Would this indicate that a native dependency of the assembly was not found? Do I need to change the log settings to see which native dependency failed, or is there something else I can do?
MyCorp.MyApplication.Core
was found, a managed version that was found was loaded. – Avicenna