New Posts New Posts RSS Feed: CompositionHost.IgnorePatterns bug ?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

CompositionHost.IgnorePatterns bug ?

 Post Reply Post Reply
Author
nazbrok View Drop Down
Newbie
Newbie
Avatar

Joined: 26-Jan-2011
Location: Paris
Posts: 21
Post Options Post Options   Quote nazbrok Quote  Post ReplyReply Direct Link To This Post Topic: CompositionHost.IgnorePatterns bug ?
    Posted: 18-Sep-2011 at 12:56am
Hi,

I think I found a bug in the compositionhost. We use Devforce 6.1.2, Caliburn-Devforce and MEF

I have a XAP named Company.Telerik.AutoLoad.xap. It contains only Teleriks assemblies and another one assembly named like the xap Company.Telerik.Autoload.dll. It contains one [Export]. 
The problem is nothing is exported from this assembly ...

I found out that after adding the Xap to the compositionhost nothing is really added, my assembly isn't there. The XAP is downloaded but that's all.

There is 2 way of fixing the issue :
- remove Telerik from the IgnorePattern of the CompositionHost : CompositionHost.IgnorePatterns.Remove("Telerik.*");
- Removing "Telerik" from the name of the Assembly .

How can my assembly match the pattern "Telerik.*" since it is named "Company.Telerik.*" ? Is this a bug or I misunderstood something ?

So far we removed the Telerik.* pattern from the compositionhost but can we have some side effect ? I guess there was a good reason if you added it as default !
Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Posted: 19-Sep-2011 at 11:43am
Hi nazbrok;

Yes, that is a bug. We already file a bug report for this.

The only side effect that I can think of is your DevForce app will now add any Telerik.* assemblies to its catalog. If you have a lot of Telerik assemblies, this can slow your start up time.

I suggest removing the word Telerik from the assembly name is a better workaround.
Back to Top
nazbrok View Drop Down
Newbie
Newbie
Avatar

Joined: 26-Jan-2011
Location: Paris
Posts: 21
Post Options Post Options   Quote nazbrok Quote  Post ReplyReply Direct Link To This Post Posted: 19-Sep-2011 at 11:52am
Ok, 

thanks for the answer.
Back to Top
nazbrok View Drop Down
Newbie
Newbie
Avatar

Joined: 26-Jan-2011
Location: Paris
Posts: 21
Post Options Post Options   Quote nazbrok Quote  Post ReplyReply Direct Link To This Post Posted: 29-Sep-2011 at 8:38am
Well I have got another good one !

I have on XAP with 3 assemblies named :
- WSoft.Securite.Screens.dll
  => Export the ViewModels
- WSoft.Securite.Services.dll
  => Export the repositories and UnitofWork
WSoft.Membership.Client.Domain.dll
  => Has the client side Model + Export of the IEntityManagerProvider<>

When we download the XAP only the .Screens and .Domain are found in the catalogs.
I traced down to the Ideablade.Core.Composition.Add(xap) and in the OnRecomposed event (named RefreshCaliburnAssemblySource in Caliburn) no trace of WSoft.Securite.Services.dll in the catalog.

IF we go in the properties of this project and change the Assembly Name to, for exemple, "AAAAA" it will works. I will have AAAA with his export in the catalog. It seems "WSof.Securite.Services" (-t of WSoft) works too but "WSoft.Securite" won't either.

Other strange things is I have another XAP having also 3 assemblies following this scheme.
Difference is they are named WSoft.Admissions.Screens.dll and so on. This XAP works perfectly.

IF I go in the properties of the project WSoft.Admissions.Services and say the assembly must be named WSoft.Securite.Services AND I in the project  WSoft.Securite.Services I say the assembly name is WSoft.Admissions.Services then the XAP which was working fine isn't anymore and the one which wasn't working is now working !!

this particular name "WSoft.Security.Services" (and maybe some others) seems to be a problem during recomposition.
So is this bug related to the previous on with the "Telerik*" pattern ? I am going crazy on this one, 2 days I am on it and I don't have much hair left :(


regards,









Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 29-Sep-2011 at 1:59pm
It doesn't look like the CompositionHost.IgnorePatterns is causing the problem. You can check the CompositionHost.Instance.ProbeAssemblies after recomposition to see everything that DevForce has loaded for probing. If in doubt about the IgnorePatterns, just clear them. Their purpose is just to speed up probing by removing assemblies which usually don't need to be probed.
 
I contacted the DevForce-Caliburn author also, and he says that the framework doesn't do any specific restrictions by assembly name. So, we could end up tearing our hair out too, since it's not clear where the problem might be. We don't directly support DevForce-Caliburn here on this forum, but you can get support at http://devforcecaliburn.codeplex.com/discussions.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down