在单独的AppDomain C#,MAF,未处理的异常管理 [英] C#, MAF, Unhandled Exception Management in separate AppDomain

查看:327
本文介绍了在单独的AppDomain C#,MAF,未处理的异常管理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好了,所以我有一个MAF应用程序的每个插件,它加载了一个单独的AppDomain中。这是梦幻般的工作我需要的东西,因为它让我可以动态地卸载和重装我的加载项在运行时。

Okay, so I have a MAF application which loads up each addin inside of a separate appdomain. This is working fantastic for what I need as it allows me to dynamically unload and reload my addins at runtime.

现在的问题是,我需要能够采取未处理的异常在孩子的AppDomain,抓住它,然后让​​该AppDomain中无法正常无需取下父的AppDomain

The problem is, I need to be able to take an unhandled exception in the child appdomain, catch it, and then let that appdomain fail gracefully without taking down the parent appdomain

我如何去这样做?这似乎是一个简单的任务和使用分离的AppDomain的主要好处之一...

How do I go about doing this? It seems like a trivial task and one of the main benefits of using isolated appdomains...

推荐答案

我想我的回答这个类似的问题可以帮助你:

I think my answer to this similar question should help you:

<一个href="http://stackoverflow.com/questions/16347994/application-crash-when-anoter-domain-throws-exception/16360161#16360161">Application崩溃时anoter域抛出异常

让我知道如果你需要更多的信息。

Let me know if you need any more information.

这篇关于在单独的AppDomain C#,MAF,未处理的异常管理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆