I need to be able to communicate with my MEF component from my package class. I tried several different approaches:
used [import] attributes from the package class. However the properties are always null. As I found out this is due to the fact that you cannot import MEF components from the package class.
Tried calling "componentModel.DefaultExportProvider.GetExportedValue" to get an instance of a class created by MEF. This did actually return an instance, but it appears to be a copy, or something that is not linked to the actual MEF Component
The MEF Component I'm trying to access is a custom Team Explorer page section that I created. My package has an event that when triggered, will need to call into this MEF Component via method call with some information about my application state.
It seems like this should be straightforward but I've been stuck for days.
I simply need to communicate with an MEF component from a package. Can I do this? Is this at all possible?