Bug 311450 (MONO29900) - runtime doesn't reference assemblies correctly
Summary: runtime doesn't reference assemblies correctly
Status: RESOLVED MOVED
Alias: MONO29900
Product: Mono: Runtime
Classification: Mono
Component: misc (show other bugs)
Version: unspecified
Hardware: Other Debian Woody
: P3 - Medium : Enhancement
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-05 00:47 UTC by Piers Haken
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
here's the whole test case containing compiled assemblies, (1.51 KB, application/octet-stream)
2002-09-05 00:48 UTC, Thomas Wiest
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:00:43 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"