Feb 3, 2011 at 5:14 PM
Edited Feb 3, 2011 at 5:14 PM
One of the really great things about Jounce is it's ability to dynamically download applications. The RegionManagement and RegionManagementDynamic samples are excellent and were a great way to learn.
I attempted adding a new SL application to the solution, removing the App file, and applying the ExportAsView and ExportViewToRegion attributes to the MainPage.xaml.cs file.
The .xap for the application winds up in the clientBin of the hosting web app as it should when compiled.
I added an [Export] to a new ViewXapRoute property that is defined in the same class as the one for the dynamice ViewXapRoute is defined.
So the .xap is properly downloaded when requested to be displayed on the UI, however, MEF blows up due to some recomposition issue. I've pasted the beginning of the trace, but there are actually 26 messages in all associated with the exception below.
As far as I can tell, my new application is setup EXACTLY as the RegionManagementDynamic project, and the attributes are applied and referenced as they should be. I'm not a MEF expert, I know enough to be dangerous. Any thoughts? Thanks!
System.InvalidOperationException: The package downloaded successfully but an error occurred while reading the contents of the package. See the inner
exception for more details. ---> System.ComponentModel.Composition.ChangeRejectedException: The composition remains unchanged. The changes were rejected because of the following error(s): The composition produced multiple composition errors, with 26 root
causes. The root causes are provided below. Review the CompositionException.Errors property for more detailed information.
1) Change in exports prevented by non-recomposable import 'Jounce.Framework.Services.ApplicationService.DeploymentService (ContractName="Jounce.Core.Application.IDeploymentService")' on part 'Jounce.Framework.Services.ApplicationService'.
2) Change in exports prevented by non-recomposable import 'Jounce.Framework.Services.ApplicationService.EventAggregator (ContractName="Jounce.Core.Event.IEventAggregator")' on part 'Jounce.Framework.Services.ApplicationService'.