[Mono-devel-list] Assembly Loading scheme - Differences observed between MSCLR & mo no
Vivek, Bharath Varma (IE10)
Vivek.Varma at honeywell.com
Fri Aug 20 10:44:53 EDT 2004
I observed a difference between the MSCLR and mono with respect to assembly
One use case where this difference causes a problem is in remoting.
Following is an explanation of the use case....
Lets assume there are two assemblies(dlls)
A.dll & B.dll
A.dll has a reference to B.dll
Remoting Client - Running on MS.Net
Remoting Server - Running on mono
Lets say the remoting server exposes a method called "LoadMe(byte)"
The LoadMe method in turn does an Assembly.Load(byte)
Remoting client calls RemotingServer::LoadMe(bytestream of an Assembly
A.dll) via remoting
RemotingServer::LoadMe calls Assembly.Load(bytestream of assembly A.dll)
Mono's Assembly.Load method sees that A.dll references B.dll and tries to
Alas! B.dll cannot be found!
With a Remoting Server running on MS.Net this problem does not exist, as I
presume that the MS.Net assembly loader lazy loads referenced assemblies.
To avoid this problem while running on mono the Remoting client should find
all assemblies that A.dll refer to (B.dll in the example), load them first
and then load A.dll.
Is this assembly loading scheme something that the mono runtime may change
in future so that it behaves similar to MS.Net?
More information about the Mono-devel-list