1
Vote

Assembly EmitMapper with strong name. Problem using

description

I have application with stron name.
Steps
1) I compile and singed assembly EmitMapper.dll
2) I add to reference in my project
3) I write code for Expample
    static void Main(string[] args)
    {
        var b = new b();
        var a = new a() { Id = 10, Name = "test" };
        ObjectMapperManager.DefaultInstance.GetMapper<a, b>().Map(a, b);
        return;
    }
    public class a
    {
        public int Id { get; set; }
        public string Name { get; set; }
    }

    public class b
    {
        public int Id { get; set; }
        public string Name { get; set; }
    }
4) Run
System throw Exception
{"Method 'CreateTargetInstance' on type 'ObjectsMapper1_EmitMapperTest.Program+a_EmitMapperTest.Program+b1e2fda12e240e4886968e1162b65f1d7f' from assembly 'EmitMapperAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' is overriding a method that is not visible from that assembly.":"ObjectsMapper1_EmitMapperTest.Program+a_EmitMapperTest.Program+b1e2fda12e240e4886968e1162b65f1d7f"}

How solve this ploblem?

comments