[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


https://bugzilla.novell.com/show_bug.cgi?id=450433


           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;

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

this code prints:
/tmp/nunit20/ShadowCopyCache/31461_633637325478923360/Tests/assembly/shadow/bb941988/f0c7e4a4_4b53fd2c_00000001/test.dll
file:///tmp/nunit20/ShadowCopyCache/31461_633637325478923360/Tests/assembly/shadow/bb941988/f0c7e4a4_4b53fd2c_00000001/test.dll


-- 
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