.Net MEF newbie question

Posted by steve.macdonald on Stack Overflow See other posts from Stack Overflow or by steve.macdonald
Published on 2010-03-26T20:12:53Z Indexed on 2010/03/27 2:13 UTC
Read the original article Hit count: 528

Filed under:
|
|
|
|

I am missing something basic when it comes to using MEF. I got it working using samples and a simple console app where everything is in the same assembly. Then I put some imports and exports in a separate project which contains various entities. I want to use these entities in an MS Test, but the composition is never actually done. When I move the composition stuff into the constructor of an entity in question it works, but that's obviously wrong. Does GetExecutingAssembly only "see" the test process? What am I missing re containers? I tried putting the container in a Using in the test without luck. The MEF docs are still very scant and I can't find a simple example of an application (or MS Test) which uses entities from a different project...

© Stack Overflow or respective owner

Related posts about MEF

Related posts about .NET