[Mono-dev] Version-specific binding - resolved, but real bugs found
Brian Crowell
mono-devel at fluggo.com
Tue Jun 13 19:31:42 EDT 2006
Brian Crowell wrote that Mono said:
> ** (bin/MonitorHost.exe:13141): WARNING **: The following assembly
> referenced from /var/lib/klotron-monitor/images/hostee.dll could not be
> loaded:
> Assembly: Clotron.MobileResource (assemblyref_index=1)
> Version: 3.0.2354.22385
> Public Key: (none)
> The assembly was not found in the Global Assembly Cache, a path listed
> in the MONO_PATH environment variable, or in the location of the
> executing assembly (/var/lib/klotron-monitor/images).
After digging deep into the Mono runtime (without a debugger!), I came to the
conclusion that the assembly I was trying to load had actually been corrupted by
something else I was doing. Unfortunately, just by the definition of the API,
this comes out as a file-not-found error. Therefore, Mono was doing the right
thing on this issue.
On a side note, I did discover that AppDomain.AssemblyLoad does not fire for
implicitly-loaded assemblies (referenced ones), but does fire for
explicitly-loaded and dynamic assemblies.
I also discovered that Mono does not like me reading the Assembly.CodeBase or
Assembly.Location properties on dynamic assemblies. For Assembly.Location, the
documentation implies that the property will be an empty string wherever it
doesn't apply. Throwing an exception for these properties is counter-intuitive,
especially when there isn't a IsDynamic property on Assembly to help you avoid
the exception.
--Brian
More information about the Mono-devel-list
mailing list