Assembly fails to load after the same binding was previously detected and failed with hr = 0x80070002 '

I see a weird problem where an assembly is not loaded, it is not loaded from another process that has the same parent process. Let's say Parent.exe first creates Child1.exe and tries to load the assembly with

Type.GetType("TypeName, AssemblyName1") 

      

and it fails because the assembly is not in the path of the probe. I am getting the expected warning:

WRN: Partial binding information was provided for build

But when Parent.exe creates Child2.exe and AssemblyName1 is in its path to the probe, it still cannot load AssemblyName1. Fusion magazine reveals that it didn't even try to investigate and was throwing an error message

LOG: The same link was seen before and failed with hr = 0x80070002

I see this because both Child1.exe and Child2.exe were generated from Parent.exe?

I am embarrassed. I understand that the load context is shared across the app domain, but I've never seen the load fault cache shared between processes. Maybe I am wrong?

+3


source to share





All Articles