It's a common sense when you are developing a big silverlight application that break it into many small components, to make the original XAP file relatively small and dynamically load the necessary DLLs from the server side on demand.
An easy way is to download(From WebClient) the dll in the program in the runtime accroding to the URL stored in the System.Windows.Application.Current.Host.Source(commonly), use the Assembly object and the reflection mechanism to dynamically parse the IL code and retrive information in the DLLs, to create instance of it and use it. But after this process, this Dll is still invisible for the whole application.
But this way seems to be 'local and temporary', now I am searching a 'global and everlasting' way that can dynamically load the DLLs from the client side, add this Dll to the whole project(just like add reference to this project in the visual studio). After the loading, I hope the application can use the classes or whatever in the newly loaded Dll just like use the ones in the DLLs originally included in the XAP loaded at the very beginning, use them in any threads, although the reflection is still used, I can use this dll in any threads or anywhere or anytime after this loading.
I am asking if this kind of lazy loading, I mean, real loading, can it be implemented in the .NET silverlight, or how can I do this.
It's relatively difficult for me, but maybe rather easy for you.
Thanks a lot in advance.