Merge assembly wrong if its class is used in attribute.

mousehuangmousehuang Posts: 5
edited December 13, 2010 10:16AM in SmartAssembly 5
Have one assembly ClassLibrary1:
namespace ClassLibrary1
{
    public class ClassA
    {
    }

    public class ClassB
    {
    }
}
And another assembly ClassLibrary2:
namespace ClassLibrary2
{
    [System.ComponentModel.LicenseProvider(typeof(ClassLibrary1.ClassB))]
    [System.ComponentModel.TypeConverter(typeof(ClassLibrary1.ClassA))] //PROBLEM! It still reference to the old ClassLibrary1.    
    public class Class1
    {
        
        public void Method1()
        {
            Type t = typeof(ClassLibrary1.ClassA); //OK! It reference to the new merged class in ClassLibrary2            
            ClassLibrary1.ClassB b = new ClassLibrary1.ClassB();
            Console.WriteLine(t.ToString());
        }
    }
}
ClassLibrary1 is referenced by ClassLibrary2. I tried to merge ClassLibrary1 into ClassLibrary2. The build is successful. The type "ClassLibrary1.ClassA" used in the Method1 reference to the new merged class in new ClassLibrary2. It is OK. But the type "ClassLibrary1.ClassA" used in the TypeConverterAttribute still reference to the old ClassLibrary1. Enven if its name is obfuscated to the new merged class in new ClassLibrary2. It is wrong.
This problem occurs after upgrating from {SA} 3 to {SA} 5.5. Is it a problem or some settings I should take care are missing?

Comments

Sign In or Register to comment.