[Mono-list] Finding assemblies with embedded Mono and MONO_PATH

Patrick Hartling patrick@vrac.iastate.edu
Tue, 23 Mar 2004 17:13:49 -0600

Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

I am learning how to use the Mono embedding API, and I have run into an
issue with loading assemblies that I cannot seem to get past.  My goal
is to be able to take advantage of the $MONO_PATH environment variable
when loading assemblies into application domains, but as far as I can
tell, the suggested function call, mono_domain_assembly_open(), ignores
$MONO_PATH completely.  After tracing through the code a few times, I
found that mono_assembly_load() searches $MONO_PATH, and I can load my
test assembly using that function.  However, I cannot figure out how to
add the newly loaded assembly to my application domain.

My question basically boils down to this: is it valid for me to use
mono_assembly_load() instead of mono_domain_assembly_open(), and if so,
how do I add the loaded assembly to an application domain?  If it is not
a good idea for my code to call mono_assembly_load(), should I emulate
the relevant calls in mono/metadata/assembly.c so that my code searches
$MONO_PATH prior to each call to mono_domain_assembly_open()?


Patrick L. Hartling                     | Research Assistant, VRAC
patrick@vrac.iastate.edu                | 2274 Howe Hall Room 2624
http://www.vrac.iastate.edu/~patrick/   | http://www.vrac.iastate.edu/
PGP: http://wwwkeys.gpg.cz:11371/pks/lookup?op=3Dget&search=3D0xEBF86398

Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

Version: GnuPG v1.2.3 (GNU/Linux)