[Mono-bugs] [Bug 450433] New: Assembly.CodeBase wrong for shadowed copies

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Dec 1 06:51:21 EST 2008


           Summary: Assembly.CodeBase wrong for shadowed copies
           Product: Mono: Runtime
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: sdelcroix at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

in case of shadowed copy (like used by nunit), both Assembly.Location and
Assembly.CodeBase points to the same file.

CodeBase should point to the original dll location, like it does on .NET

using NUnit.Framework;
using System;
using System.Reflection;

public class Test
        public void DoesThisWork ()
                Console.WriteLine (Assembly.GetAssembly (GetType ()).Location);
                Console.WriteLine (Assembly.GetAssembly (GetType ()).CodeBase);
                Assert.AreEqual (1, 1);

this code prints:

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list