Exception when creating an exporter instance

I have two export classes that are located in separate assemblies.

When using an [ImportMany]exception when creating an instance of one exporter (in my case, this is an error connecting to DB that is created in the constructor), it creates a zero storage set [ImportMany].

I expect that there will be only one, the correct instance, exported to [ImportMany](when you try to activate MEF, the other will be damaged).

Is there a way to customize this behavior? Or any ways to download exporters one at a time?

Thanks in advance guys!

+4
source share
1 answer

, , . SafeDirectoryCatalog, ComposablePartCatalog ReflectionTypeLoadException . , .

+1

All Articles