Trying to track down why a co-worker is having an issue with a dynamically loaded xap, looking at the following in the output
17 : 7/3/2013 2:05:02 PM : : IdeaBlade.Core.Composition.PartsCatalog:LoadCatalog : No new content found in dynamic xap /../Modules/custommodule.xap
18 : 7/3/2013 2:05:02 PM : : IdeaBlade.Core.Composition.PartsCatalog:OnRecomposed : Dynamic content added: /../Modules/custommodule.xap, loaded without error
The call to Composition.AssXapAsync(/../Modules/custommodule.xap) is below and everything seems to run without an obvious error/problem. End result though is that the exported view model they are after isn't found and thus can't be used. Thoughts on what direction to look in?
AppBootstrapper.cs
public class AppBootstrapper : CocktailMefBootstrapper<ShellViewModel>
{
...
protected async override void StartRuntime()
{
base.StartRuntime();
await Composition.AddXapAsync("/../Modules/custommodule.xap");
}
...
}
We've tried looking at timing issues and moving the call to our splash screen which is where it's actually needed once a license file is check to determine whether to load the xap or not, same results there so for simplicity sake in the example we have the call back in the StartRuntime(). The only thing that seemed odd, but it could just be due to the async nature of the logged messages is that the OnRecomposed message that it was 'loaded without error' comes after the 'no new content found'.
We have several exported instances of this same type of view model that are working fine, but they are currently located in the main xap, not via a loaded external xap as this one is. This is basically just a copy/paste of one of these working viewmodels with a new name and associated Unit Of Work (also re-classed to match)
[Export(typeof(IDashboardItem))]
[PartCreationPolicy(CreationPolicy.NonShared)]
public class HomeTileTestViewModel: DashboardItem
{
...
}
Hoping for the obvious, let me know if I'm leaving anything out that may help.