问题
I have a silverlight application elevated trust deployed at my company and some errors I get the "debugging resource strings are unavailable" I was wondering if there was any way currently for silverlight 4 to get the full error message without installing the developer version of silverlight on every single machine.
Thanks in advance
回答1:
Hope this article helps u... Check this
By default, the full exception strings are not enabled in silverlight. You need to enable it in the slr.dll.managed_manifest file.
回答2:
I would wrap the code giving the exception in try/catch brackets and then use MessageBox.Show to display the error message;
try
{
// Code that crashes
}
catch (Exception e)
{
MessageBox.Show("Error: " + e);
}
Exception also contains some other useful variables. Hope this helps.
来源:https://stackoverflow.com/questions/7879697/silverlight-4-getting-full-exceptions