Silverlight 4 Getting full exceptions

2019-05-28 11:48发布

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

2条回答
别忘想泡老子
2楼-- · 2019-05-28 12:32

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.

查看更多
混吃等死
3楼-- · 2019-05-28 12:43

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.

查看更多
登录 后发表回答