I am working on a Winforms project and i want to try to implement MEF for property injection. I know that MEF isnt a IoC container but it is possible to accomplish what i want.
I have setup the container correctly and injection works fine. The problem i have is the designer generated code, if an object instance is created MEF is not aware of this and ignores the imports.
The only way i can get DI working in those instances is to make MEF aware with SatisfyImportsOnce. This will result that objects which will be instantiated by designer code have a dependency on the MEF container for invoking SatisfyImportsOne and creating
dependencies is something i just want to avoid :)
Is there a best practice? Or would it be better to use a IoC container(windsor, unity) for this purpose?
What is your advice?