When debugging against a physical device you may get this message when breaking on an exception:
“An error message cannot be displayed because an optional resource assembly containing it cannot be found”.
It’s extremely annoying because it doesn’t tell you what ‘optional resource’ that is missing. Luckily I found a clue on the Microsoft Forums (link).
If you get this message you should try to install the file “System_SR_ENU_wm.CAB” from the Mobile 5.0 SDK (mine was at %program files%\Visual Studio 2005\SmartDevices\SDK\CompactFramework\2.0\v2.0\
Note that the ENU parts corresponds to English-US so if you have set a different locale on your device (Start->Settings->System tab->Regional Settings) you should chose the corresponding .CAB file (if your locale don’t have a CAB hopefully the ENU will work, although I haven’t tried it).
Also note that the file can be uninstalled as a normal program (Start->Settings->System tab->Remove Programs).
What’s bugging me is that it seems like this problem suddenly appeared (i.e. I got error messages before), and I don’t know why. Ah, well – as long as it works…
Edit: Tip – if it doesn’t work, try changing your locale to the language you installed. (Settings->System tab->Regional Settings)