New Posts New Posts RSS Feed: Dynamic loading Domain assembly
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Dynamic loading Domain assembly

 Post Reply Post Reply
Author
rehmanmansoor View Drop Down
Newbie
Newbie


Joined: 25-Apr-2013
Location: Australia
Posts: 1
Post Options Post Options   Quote rehmanmansoor Quote  Post ReplyReply Direct Link To This Post Topic: Dynamic loading Domain assembly
    Posted: 25-Apr-2013 at 6:48pm
HI ,

I have Domain Entities reference in the Silverlight Class Library. And im using that SL Library in our SL Application.

So to reduce the XAP file i need to download my Silverlight Class Library on demand when the Xap file is downloaded and ready to use.

I have used WebClient class to download and load my SL Class Library in to my silverlight application domain.
But im getting an error that is

"Unable to get metadata for Project1.Data.Entities.BaseDomainModelEntity. Make sure it is a valid entity type or POCO type with a KeyAttribute"

BaseDomainModelEntity.cs is the base class for all the Entities

Pls guide me how to work out in this scenario

I have also look into this article http://drc.ideablade.com/xwiki/bin/view/Documentation/on-demand-discovery
But correct me if im wrong this on-demand-discovery in only used to download modules in new XAP file ? As i need to download Silverlight Class Library not SL Application.

Thanks in Advance.
RM
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: 26-Apr-2013 at 9:25am
The DynamicXap is most frequently used in SL apps with DevForce, since it wraps both the WebClient download and the recomposition necessary for DF to recognize the new content.

If you wish to download a DLL only you can still do this. After downloading and loading the assembly, wrap it in a MEF AssemblyCatalog, and pass this to the DF CompositionHost:

Assembly asm = ...
var catalog = new AssemblyCatalog(asm);
IdeaBlade.Core.Composition.CompositionHost.Add(catalog);
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down