Print Page | Close Window

Getting, "No new content found in dynamic xap" after updating

Printed From: IdeaBlade
Category: Cocktail
Forum Name: Community Forum
Forum Discription: A professional application framework using Caliburn.Micro and DevForce
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=4672
Printed Date: 17-Nov-2019 at 4:02am


Topic: Getting, "No new content found in dynamic xap" after updating
Posted By: JohnBloom
Subject: Getting, "No new content found in dynamic xap" after updating
Date Posted: 08-Apr-2014 at 2:37pm
Recently we updated to the latest version of cocktail and devforce. Everything went fine and the program starts. However, one of our xaps is not being loaded into the catalog and so none of the exports are being exported by MEF. Here is a piece of the output log:

IdeaBlade.Core.Composition.PartsCatalog:LoadCatalog : No new content found in dynamic xap SystemModule.xap
8 : 4/8/2014 4:28:46 PM :  : IdeaBlade.Core.Composition.PartsCatalog:OnRecomposed : Dynamic content added: SystemModule.xap, loaded without error
9 : 4/8/2014 4:28:46 PM :  : IdeaBlade.Core.Composition.PartsCatalog:LoadAssembliesIntoCatalogs : Assembly 'FillingModule, Version=1.14.4.3, Culture=neutral, PublicKeyToken=null' added to PartsCatalog
10 : 4/8/2014 4:28:46 PM :  : IdeaBlade.Core.Composition.PartsCatalog:LoadCatalog : Probe assemblies found in dynamic content: FillingModule, Version=1.14.4.3, Culture=neutral, PublicKeyToken=null
11 : 4/8/2014 4:28:46 PM :  : IdeaBlade.Core.Composition.PartsCatalog:OnRecomposed : Dynamic content added: FillingModule.xap, loaded without error

notice that the fillingmodule is loading fine but the systemmodule is not. I have tried everything I can think of to see what is different about the SystemModule from the FillingModule and the other 3 that are loading fine and I have not come up with anything. There is no errors in the output and we are not messing with any search patterns as suggested here:

http://www.ideablade.com/forum/forum_posts.asp?TID=4207&PID=16526&title=ideabladecorecompositionpartscatalogloadcatalog-no-new-content-found-in-dynamic-xap-modules-custommodulexap-exported-viewmodel-instance-not-available#16526

Any ideas about what could be going wrong? We are using the CocktailMefBootstrapper and pretty much running it with everything as default. I also tried adding it as a reference in the main xap and the MEF still didnt pick it up. My only guess is that it is named System so it gets ignored but other than that I have nothing.


-------------
-John Bloom



Replies:
Posted By: JohnBloom
Date Posted: 08-Apr-2014 at 2:44pm
Ok yes there is a bug somewhere. I renamed the module to JohnnyModule and everything worked. Any idea how I can fix this or am I going to have to go with my JohnnyModule?

-------------
-John Bloom


Posted By: mgood
Date Posted: 09-Apr-2014 at 11:59am
John,
Not a bug, but following are the default IgnorePatterns to make sure we are not probing .NET system assemblies. If you name your assembly System.dll it's being ignored, because it machtes the "^System.*" pattern.

    private static List<string> BuildIgnoreList() {
      return new List<string>(new[] {
      "*.exe.config",
      "*.dll.config",
      "^IdeaBlade.*",
      "^System.*",
      "^Microsoft.*",
      "*.vshost.*",
      "^mscorlib.*",
      "^WindowsBase.*",
      "^PresentationCore.*",
      "^PresentationFramework.*",
      "^PostSharp.",
      "^EntityFramework.",
      "^Intersoft.*",
      "^Telerik.*",
      "^DevExpress.*",
      "^Infragistics*",  // Will be *2, 3, or 4.  SL assemblies are InfragisticsSLn.  WPF are now InfragisticsWPFn.
      "^WPFToolkit.*",
      "^Syncfusion.*",
      "^Janus.*",  
      "^C1.*", 
      "^PerpetuumSoft.*", 
      "^Xceed.*",
      });
    }


Posted By: JohnBloom
Date Posted: 09-Apr-2014 at 12:31pm
But my project was named SystemModule so the  "^System.*" pattern shouldn't hit because there is no "." after System. That is why I was confused and didn't look into name at first. Also this was in a recent update, is that ignore list a new thing? I ended up going with SysModule but I still think that SystemModule should have worked.

-------------
-John Bloom


Posted By: mgood
Date Posted: 09-Apr-2014 at 1:02pm
The IgnorePatterns are regular expressions. "^System.*" matches anything starting with the word System. The dot means any character. The expression you are thinking of is "^System[.].*" which will look for an actual dot followed by anything after the dot.

The IgnorePatterns are not new, but we've added new patterns over the years. You can also modify the list of ignore pattern. The discovery mechanism in DevForce is documented here: http://drc.ideablade.com/devforce-2012/bin/view/Documentation/discovery

We recommend for many reasons to adopt an assembly naming scheme that puts your own assemblies into its own namespace. Something like Company.AssemblyName.dll.


Posted By: JohnBloom
Date Posted: 09-Apr-2014 at 1:06pm
Ah you are right. We adopted the Company.AssemblyName.dll on our backend code I just never changed the front end. Thanks for the help! 

-------------
-John Bloom


Posted By: mgood
Date Posted: 09-Apr-2014 at 1:08pm
You are welcome. I just realized that I need to brush up on my regex myself :-). The correct expression that would match a dot after System would look like this: "^System\..*"



Print Page | Close Window