An unhandled exception of type 'System.TypeLoadException' occurred in Unknown Module
I have recently updated a legacy compact framework application to support Windows Mobile 6.5 but after going through my backwards compatability testing I have an issue with the WinCE 5 device.
When attempting to run the application from both the EXE and the debugger I get the "An unhandled exception of type 'System.TypeLoadException' occurred in Unknown Module." exception but its not giving me any idea which dll / type it has issue with.
The changes do work on the Windows Mobile 6.5 Motorola device and the Po开发者_Go百科cket PC 2003 Psion Device but not on the WinCE5 Psion device.
Does anyone have any ideas how I can find out which reference is causing me the issue. I have tried removing the new references to the Symbol barcoding and imaging libraries but I am still getting the same error.
Thanks,
Phil
UPDATE: OK, it looks like the .Net Compact Framework installation had corrupted some how. I flattened the device, reinstalled and everything appears to be working.
Do you have a reference to the Micrsoft.WindowsMobile assembly in the app? If so this will cause a failure (though I'm not 100% certain what the failure would look like, as I've not tried it in a long time). The WindowsMobile functionality is in an assembly that is already present on WinMo devices (so not part of the CF that is deployed by Studio), so a TypeLoadException
wouldn't surprise me.
OK, it looks like the .Net Compact Framework installation had corrupted some how. I flattened the device, reinstalled and everything appears to be working.
精彩评论