Two Types not equal that should be

The same class / type loaded by different app domains [.NET] or class loaders [Java] will not compare equal and are not assignable to/from each other directly.

You likely have two copies of the DLL containing that type – one loaded by the main program and one loaded by one of the Assembly.Load*(...) methods?

Try displaying / comparing the properties:
a.Assembly.Equals(b.Assembly)
and
a.Assembly.Location.Equals(b.Assembly.Location)

In general, you only want one copy of each DLL and have it loaded into a single app domain.

Leave a Comment