Silverlight Download XAP in Background Thread

I'm Developing an application that loads module XAPs via MEF using the DeploymentCatalog Class, what I want to do is have this process happen in a background worker thread, so it doesn't block the GUI up.

When I do this in a background worker thread I get an Error in the Downloaded Completed Event saying that there is a CrossAccess Thread Exception. Is there any one else out there having the same problem, and is there any one know of a solution to this
problem.

The DeploymentCatalog already does its downloading asynchronously, so the download won't block the UI thread. Once the download completes the catalog would be created on the UI thread, but I wouldn't expect that to introduce a noticeable delay. Were
you having issues?

I'm not sure why you are getting the error though. Can you post the code in your download completed event, as well as the full exception message and stack trace you get?

Is the code you use to start the downloads running on a UI or background thread? It needs to run on the UI thread, otherwise I believe the DownloadCompleted event won't be marshalled back to the UI thread. The code in that event needs to run
on the UI thread. You can't call CompositionInitializer.SatisfyImports from a background thread, because the container isn't thread-safe, and because doing so will create UI objects if you have exported any UI objects, and those need to be created on
the UI thread.