âDuring the final testing phases for our Windows Phone Developer Tools CTP refresh, we discovered a bug that’ll impact developers using some existing âtransparent Silverlightâ assemblies (Microsoft & 3rd party) in Windows Phone applications, with regard to loading of signed precompiled assemblies in context of your app,â stated Brandon Watson.
Detecting Problem: If your app deploys to the emulator, but fails to run with a âSystem.IO.FileLoadExceptionâ then you may be using a signed assembly.
Theseâll be assemblies you manually added to your project.
For e.g., if you have an app that uses System.ServiceModel.Syndication.dll (assembly shipped with Silverlight SDK and thus is digitally signed) and you try to run that app in the emulator itâll fail in a debugger with an error like:
“A first chance exception of type âSystem.IO.FileLoadExceptionâ occurred in mscorlib.dll.”
âWorkaround: Temporarily use copies of assemblies which donât have signing certificates in them.
A PowerShell script that makes creating these copies easy is available — Simply run it, specifying a path to assembly you want to use, and itâll create a copy with an easily identifiable filename prefix of âWP7_CTP_Fixâ. You can then use this assembly with CTP Refresh.
Copy script to a folder on your machine and follow steps similar to these. PowerShell is built into Windows 7.
If youâre running Windows Vista, install PowerShell,â explains Watson.