Print Page | Close Window

"IdeaBlade.Core.Composition.PartsCatalog:LoadCatalog : No new content found in dynamic xap /../Modules/custommodule.xap" - Exported ViewModel instance not available

Printed From: IdeaBlade
Category: Cocktail
Forum Name: Community Forum
Forum Discription: A professional application framework using Caliburn.Micro and DevForce
Printed Date: 15-Jul-2020 at 12:25am

Topic: "IdeaBlade.Core.Composition.PartsCatalog:LoadCatalog : No new content found in dynamic xap /../Modules/custommodule.xap" - Exported ViewModel instance not available
Posted By: irishbuddha
Subject: "IdeaBlade.Core.Composition.PartsCatalog:LoadCatalog : No new content found in dynamic xap /../Modules/custommodule.xap" - Exported ViewModel instance not available
Date Posted: 03-Jul-2013 at 11:32am
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?

public class AppBootstrapper : CocktailMefBootstrapper<ShellViewModel>
        protected async override void 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)

public class HomeTileTestViewModel: DashboardItem

Hoping for the obvious, let me know if I'm leaving anything out that may help.

Posted By: mgood
Date Posted: 03-Jul-2013 at 12:47pm
You'll get the "No new content found..." message if no additional probe assemblies were loaded from the XAP - it could be because they've already been loaded or due to an error. If no error is logged, then it could be that the search/ignore patterns are blocking the new content. 

On a related note if you want to indeed load the XAP during bootstrapping then do it in StartRuntimeAsync, so the bootstrapper waits for it to complete. 

Posted By: irishbuddha
Date Posted: 03-Jul-2013 at 12:58pm
Best problem I've had all day, thanks Marcel.
Looking at decreasing the initial load time a month or two back, we had introduced a .Clear() of the search patterns that I was overlooking, and that turned out to be the exact issue.

Thanks for the awesomeness Marcel.

Posted By: mgood
Date Posted: 03-Jul-2013 at 1:07pm
That was easy :-). Glad you got it sorted out.

Print Page | Close Window