[Mono-bugs] [Bug 78165][Nor] Changed - Assembly.LoadFrom loads the wrong assembly

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Apr 22 18:28:23 EDT 2006

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 robertj at gmx.net.


--- shadow/78165	2006-04-22 14:38:17.000000000 -0400
+++ shadow/78165.tmp.22674	2006-04-22 18:28:23.000000000 -0400
@@ -1,14 +1,14 @@
 Bug#: 78165
 Product: Mono: Runtime
 Version: 1.1
+OS: unknown
 OS Details: 
 Status: NEW   
+Severity: Unknown
 Priority: Normal
 Component: misc
 AssignedTo: mono-bugs at ximian.com                            
 ReportedBy: colin at breame.net               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
@@ -54,6 +54,26 @@
 public class Test {    
         public override string ToString() {    
                 return "hello from test.dll";    
+------- Additional Comments From robertj at gmx.net  2006-04-22 18:28 -------
+The bug is in assembly.c:mono_assembly_load_from_full ()
+It uses search_loaded () to find out whether the
+assembly is already loaded. Since the search is based
+on the AssemblyName, it returns the wrong assembly if 2
+different assemblies have the same name, like in the test
+case above.
+The test case works on MS.NET as expected.
+Colin, despite of the bug (if it's one), giving 2 assemblies
+the same name is a bad idea. Even if the files are
+called test.dll and test.exe, the AssemblyName is "test"
+because the extension is not relevant.
+If you really need test.exe and test.dll, compile the
+exe into another file using mcs /out:testapp.exe and
+rename it to test.exe

More information about the mono-bugs mailing list