I just spent much time refactoring my recently released Silverlight 4 project at work to use Silverlight 5, with in-browser elevated trust enabled. We want to get rid of having to use Isolated Storage for temporary storage, instead we want to use a folder inside of the client’s My Documents folder. After going through every assembly, ensuring that they’re all signed with their private key, that the XAP gets signed with its certificate and fixing assembly references to use strong-names, a run-time error occurs:
A first chance exception of type 'System.Reflection. ReflectionTypeLoadException' occurred in mscorlib.dll Additional information: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
This came when calling:
CompositionInitializer.SatisfyImports(this);
I couldn’t get that fixed no matter what I tried. After having googled around a bit, I found this (TypeLoadException in MEF, SL5 RC) and this (Silverlight 5 RC TypeLoadException). Seems to me that I can’t continue working, because my Silverlight app won’t start. Unless I comment out almost the half of it (we use MEF in many places), or I temporarily implement some manual loading. This error wasn’t there in Silverlight 5 Beta, and only happens in elevated trust scenarios.
Why can’t we still download the Silverlight 5 Beta? When is Silverlight 5 going to be released?