title: MEF: injecting types along with objects?
body: <p>I would like to build an extensible NET application using MEF. This works very well for discovering and injecting instances of new types in my application. The problem I have is that some API I am using does not permit injecting new objects, but instead receives as input the type for those plugged in objects which is obviously unknown compile time. Of course I can resolve the type of an object at run time in my code but in order for the API to work I would also have to load the assembly containing the plugins, a step which is obviously not performed in a typical MEF application. I could do that at runtime by scanning the directory where new plugins will be dumped and load those dll-s but this does not feel very MEFy anymore .. Is there some other way? Thanks.</p>