在单独的AppDomain C#,MAF,未处理的异常管理异常、未处理、AppDomain、MAF

2023-09-04 13:22:01 作者:不要太长像这样刚刚好

好了,所以我有一个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:

Application崩溃时anoter域抛出异常

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

Let me know if you need any more information.

 
精彩推荐
图片推荐