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@lists.ximian.com
        ReportedBy: [EMAIL PROTECTED]
         QAContact: mono-bugs@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.
_______________________________________________
mono-bugs maillist  -  mono-bugs@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to