[Mono-bugs] [Bug 62135][Maj] Changed - Assembly loader difference between Mono and .NET

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 11 Sep 2004 17:36:11 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by gert.driesen@pandora.be.

http://bugzilla.ximian.com/show_bug.cgi?id=62135

--- shadow/62135	2004-09-11 16:26:54.000000000 -0400
+++ shadow/62135.tmp.25503	2004-09-11 17:36:11.000000000 -0400
@@ -102,6 +102,51 @@
 
 ------- Additional Comments From gert.driesen@pandora.be  2004-07-30 08:57 -------
 *** Bug 57602 has been marked as a duplicate of this bug. ***
 
 ------- Additional Comments From vargaz@freemail.hu  2004-09-11 16:26 -------
 Should be fixed in CVS.
+
+------- Additional Comments From gert.driesen@pandora.be  2004-09-11 17:36 -------
+Its working great, thanks !!!
+
+One remark though : the output is really verbose.
+
+For example, when I now execute the attached test case, I get the
+following output :
+
+** (a.exe:28925): WARNING **: Could not find assembly c, references
+from /home/gert/mono-test-projects/assembly-loading-simple/b.dll
+(assemblyref_index=1)
+     Major/Minor: 0,0
+     Build:       0,0
+     Token:
+System error: No such file or directory
+
+
+** (a.exe:28925): WARNING **: Could not load class from token
+0x01000003 in /home/gert/mono-test-projects/assembly-loading-simple/b.dll
+Loading assembly "b" ...
+Assembly "b" loaded ok.
+Initializing type in assembly "b" ...
+Type initialized ok.
+Invoking method which uses assembly "c" ...
+
+** (a.exe:28925): WARNING **: Missing method .ctor in assembly
+/home/gert/mono-test-projects/assembly-loading-simple/b.dll typeref
+index 3
+
+Unhandled Exception: System.NullReferenceException: Object reference
+not set to an instance of an object
+in (unmanaged) a.SomeClass:Main (string[])
+in <0x00085> a.SomeClass:Main (string[])
+
+Why doesn't Mono just throw a FileNotFoundException when trying to
+actually use an assembly that cannot be found, like MS does ?
+
+Is it necessary to output the two warning messages (even if the
+assembly is not actually used) ? Ofcourse the information is useful,
+but wouldn't it be better to only output that information when the
+exception is thrown (like MS does).
+
+Also, mcs still tries to load the full chain of assembly references,
+but I'll submit a separate bug report for this.