TruthOf42
TruthOf42

Reputation: 2107

How to implement MEF in Silverlight

I am trying to use MEF inside a Silverlight application. All the examples I find use this type "System.ComponentModel.Composition.Hosting.DirectoryCatalog", but is apparently not in Silverlight, only .NET.

I am trying to get it so I drop the dll's (at runtime) in a directory the app has access to and then load those dll's using MEF.

I do understand how the Import and Export work, but I guess the issue is how do I dynamically add the xap files to my project so I can use the import and export?

Upvotes: 0

Views: 121

Answers (2)

TruthOf42
TruthOf42

Reputation: 2107

The answer was as simply as I thought. I ended up using a tutorial, which was not as straightforward as I though. Anyone that encounters this issue I suggest simplifying the tutorial version to it's smallest parts and then using it as a template

Upvotes: 0

h_djebli
h_djebli

Reputation: 2569

have a look at Prism : http://compositewpf.codeplex.com/
And here is a tutorial for MEF using Prism: http://www.codeproject.com/Articles/155835/Prism-for-Silverlight-MEF-in-Easy-Samples-Part-1-P

Upvotes: 1

Related Questions