[Mono-dev] Resolving dependencies while compiling

paszczi paszczi at go2.pl
Wed May 20 07:18:48 EDT 2009


I recently found very annoying thing about mono compiler. Let's say that we have the following file structure


Where X.dll depends on Y.dll
Now I try to compile project Z which references X.dll and Y.dll. While compiling, gmcs throws error that the assembly referenced from X.dll: Y.dll,... could not be loaded because it was neither found in GAC nor in the lib/X/ directory. One may think: "Hey why the hell you don't put those libs in GAC" - the problem is that sometimes I can't due to the permission restrictions. The option of putting all libs together is... well it creates a lot of mess. VS compiler somehow manages to resolve those dependencies (looking in other directories or doing checks after everything was put in single location during compilation maybe?) and doesn't throw any error and compiles solution just fine. Currently I'm using a rather nasty workaround: in lib/X/X.dll i put a symlink to Y.dll but again this creates a lot of mess. Is there anyway this behavior can be bypassed (via some env variable)?.

Best regards,

More information about the Mono-devel-list mailing list