NotSupportedException in localized Compact Framework app

Today I was working on a Pocket PC app using Compact Framework 3.5. The app ran fine on the VS emulator, but when I finally deployed to the actual Pocket PC devices, it started throwing exceptions. The exceptions being thrown were of the type NotSupportException with the message System.Globalization.CultureInfo. Yeah great error message guys, I can really work with that…

The weird thing was that some forms were working fine, whilest others weren’t. I couldn’t detect any difference in references or code; all exactly the same. Finally I found some posts about the possibility of the resource (.resx) files being corrupted themselves. As a last resort I tried deleting the resource file of one of the forms and recreating it from scratch. And magically! That form started working again!

So apparantly, the cryptical errormessage means your resx file is corrupted somehow. I couldn’t figure out what was wrong with the other ones, but they all started working again once I had recreated them from scratch.

So if you need the above solution: I hope you don’t have too much forms to re-edit….

, ,

Related posts

Latest posts

Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *