views:

4526

answers:

2

In the .NET Compact Framework 3.5 exceptions by default don't have their actual error message string installed. Great for cramming the compact framework into windows mobile devices with less memory, but not so great when you're a developer and something goes wrong on the device.

From the default placeholder message I know there is a CAB available to install these messages in case room is available and they are needed. I have already installed NETCFv35.Messages.EN.wm.cab on my phone. However, I still get the following Exception.Message for every exception thrown:

"Er is een foutmelding beschikbaar voor deze uitzondering, maar deze kan niet worden weergegeven omdat deze berichten optioneel zijn, en momenteel niet zijn geïnstalleerd op dit apparaat. Installeer NETCFv35.Messages.EN.wm.cab voor Windows Mobile 5.0 en hoger of NETCFv35.Messages.EN.cab voor andere platforms. Start de toepassing opnieuw om het bericht weer te geven."

Even if you don't read Dutch, the general meaning of the message should be clear enough. Funny thing is that, even though both my Vista VS2008 developement laptop is in English and my HTC TyTN II (development) mobile phone has a standard WM6 UK ROM on it, this message is in Dutch. (?)

I would really appreciate if anyone has answers to any of the following questions:

  • Is the Dutch message perhaps coming from the NETCFv35 itself? It was not in the TyTN II WM6 ROM, either VS2008 or I myself must have installed it. Is there even a localization of the framework itself?
  • Is the Dutch message perhaps coming from the NETCFv35.Messages.EN.wm.cab I installed after seeing the message for the first time? Even though it has "EN" in its name?
  • And how would I know?
  • Running the application in a blank WM6 Professional emulator lets VS2008 install the NETCFv35 on it and there I get exception messages in English.
  • Bottom line: Who has any idea what I would have to do to get actual Exception.Message texts from my phone? Either Dutch or English is fine. ;-)
A: 

What about your regional settings?

Konstantinos
You mean that NETCFv35.Messages.EN.wm.cab might really include English messages and a default one for each of the other locales, which would give me the generic Dutch one on my phone? (Which is set to Dutch in regional settings to get date/time/currency format right.)
peSHIr
Will have to check whether anything changes with the exception message when I set the regional settings to something in English. Thanks for the suggestion, will get back to you on this.
peSHIr
yes, i was suggesting to check the regional settings of your PDA and see whether its dutch or english
Konstantinos
+3  A: 

Have you tried what is proposed here? It is an MSDN blog post about fixing exception messages on the .NET Compact Framework 3.5.

kgiannakakis
I hadn't seen this blog post yet, but it seems to describe the problem (and a possible solution) perfectly. Still have to try it out - original reason for wanting to know a particular exception message is gone now - but this seems to be the answer I was looking for.
peSHIr