Bugzilla – Bug 311450
runtime doesn't reference assemblies correctly
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by piersh@friskit.com 2002-09-04 17:47:17 MST ---- to repro: - create two assemblies with the same name (eg, 'a.dll') containing different types and place them in different directories (eg, "./1/a.dll", "./2/a.dll"). - now try to load and reflect the types in both assemblies. - the second assembly will never be loaded, it will just return a reference to the first (see mono/mono/metadata/assembly.c, line ~393, " /* avoid loading the same assembly twixe for now... */") here's the source for the test, I'll try to attach the whole test case: using System; using System.Reflection; using foo; namespace test { class Test { public static void Main (string [] rgArgs) { Assembly asm1 = Assembly.LoadFrom ("1/a.dll"); Assembly asm2 = Assembly.LoadFrom ("2/a.dll"); Console.WriteLine ("asm1:"); foreach (Type t in asm1.GetTypes ()) Console.WriteLine (t.Name); Console.WriteLine ("asm2:"); foreach (Type t in asm2.GetTypes ()) Console.WriteLine (t.Name); } } } ---- Additional Comments From piersh@friskit.com 2002-09-04 17:48:30 MST ---- Created an attachment (id=164337) here's the whole test case containing compiled assemblies, ---- Additional Comments From piersh@friskit.com 2002-09-04 17:49:15 MST ---- ugh, the above file is a .tar.gz ---- Additional Comments From gonzalo@ximian.com 2002-12-01 22:14:45 MST ---- *** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO27663 *** ---- Additional Comments From Patrik.Torstensson@intel.com 2003-02-18 05:25:14 MST ---- This is not really a bug, the test case fails under MS.Net also. The assembly loading does a version checking (not yet in Mono) but two assemblies with default version information will be loaded as the same assembly (even on MS). This bug is marked as duplicate of 27663 and that's not correct. Imported an attachment (id=164337) This bug was marked DUPLICATE in the database it was moved from. Changing resolution to "MOVED"