(1) I have a silverlight app, where I'm downloading a package (via the MEF PackageLoader), doing an Import via PartInitializer, and all works fine and well.
(2) I then have a Silverlight unit-test app (of the type one Jeff Wilcox created), and it has project references too all the assemblies involved.
(3) The problem is, when I call the exact same code mentioned in (1) from within the unit-test I get an error:
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Within this test I can new() up an instance of the object MEF is failing to create, so it appears all required references are packaged into the unit-testing XAP.
What to do?
Is there some kind of special catalog initialization I have to do within the unit-test system? Any advice much appreciated.