Ideally I'm looking to do something like this:
Dim bw As New CustomBackgroundWorker
Sub(sender As Object, e As DoWorkEventArgs)
Dim aggregateCatalog As New AggregateCatalog
Dim container As CompositionContainer
container = New CompositionContainer(aggregateCatalog)
It seems that the default constructor for DeploymentCatalog accesses System.Windows.Deployment.get_Parts to get all of the assemblies in the default XAP.
System.Windows.Deployment is a dependency object, so the call to get_Parts blows up, as it is a DependencyProperty.
Is there a way I could tinker with the DeploymentCatalog (ideally) or write my own ComposablePartCatalog that would allow me to pass in the assembly list?
I suspect that once I get around the System.Windows.Deployment.get_Parts call, the rest of the deployment catalog will support running on the background thread.
It looks like I could inherit from DeploymentCatalog and write my own constructor, however, I won't be able to set any of the private variables.
Any suggestions would be most appreciated.