What is this Fusion magazine?

I am debugging the issue of loading the assembly, so I am looking at the merge logs. Sometimes they confuse me because they start by indicating a failure, and then at the end they say that the assembly is loading from where I expect it to load.

What does “Operation Failed” mean, followed by “IL assembly loaded from ...”? Failed to load assembly or failed?

*** 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 assembly log, even when the program finishes writing can't load file or assembly SomeAssembly or one of its dependencies . The corresponding assembly is loaded according to a log entry similar to the one above.

Does this mean that the native dependency of the assembly was not found? Do I need to change the log settings to find out which of the original dependencies failed, or is there something else I can do?

+6
source share
1 answer

I think this is because the CLR makes some attempts to search the dll so that it first fails and then succeeds. You can bind to the assemblyresolve event and see how it works. If I remember, it first searches in the GAC, then the local folder, then the subfolders ...

See documentation here

0
source

Source: https://habr.com/ru/post/910889/


All Articles