Are you sure that it is the same IPlugin interface that the application and the library are referring to? You haven't declared two interfaces with the same name, one in the application and one in the library, have you? As I say, I've never done this myself but I would assume that the IPlugin interface would have to be declared in a library spearate to both the application and the plugin, so that both could reference it and be referring to the same type.