You will need to use the InheritedExportAttribute instead of the ExportAttribute
:
[InheritedExport(typeof(IPlugin))]
public abstract class BasePlugin:IPlugin
Note that this will only work for plugins that derive from BasePlugin
. Other implementations of IPlugin
will not be marked for export. To do this you will have to decorate the interface instead.