加载沙箱 AppDomain 会使调试器崩溃
我正在创建一个沙箱AppDomain
,以便我可以加载程序集并释放它。
var sandbox = AppDomain.CreateDomain("Sandbox", null,
AppDomain.CurrentDomain.SetupInformation);
但是,当我将程序集加载
到沙箱
中时,调试器崩溃。我在 ASP.NET 中。
var assemblyName = AssemblyName.GetAssemblyName(assemblyPath);
var assembly = pluginDomain.Load(assemblyName); // crash here
有人知道为什么会崩溃吗?
I am creating a sandbox AppDomain
so I can load up an assembly and release it.
var sandbox = AppDomain.CreateDomain("Sandbox", null,
AppDomain.CurrentDomain.SetupInformation);
However when I Load
an assembly into to sandbox
, the debugger crashes. I am in ASP.NET.
var assemblyName = AssemblyName.GetAssemblyName(assemblyPath);
var assembly = pluginDomain.Load(assemblyName); // crash here
Anyone know why this crashes?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您能详细说明一下“调试器崩溃”的含义吗? Visual Studio 本身是否崩溃、调试器是否只是停止并返回到 Visual Studio 设计模式、弹出异常对话框等等...
对于所有这些情况,我要做的第一件事是更改以下调试器选项重复该场景。
Can you elaborate on what you mean by "Debugger Crashes". Does Visual Studio itself crash, does the debugger just stop and returns to Visual Studio design mode, does an exception dialog popup, etc ...
For all of these cases though the first thing I would do would be to change the following debugger options and repeat the scenario.
我遇到了类似的问题:仅在调试时,我的程序在访问AppDomain时退出,没有任何异常。查看事件查看器后,我发现 Microsoft.IntelliTrace.Profiler 导致了应用程序错误。
解决方案是禁用 intellitrace:
取消选中:工具 ->选项->智能跟踪 ->启用智能跟踪
I had a similar issue: Only when debugging, my program quit without any exception when accessing AppDomain. After looking in the event viewer, I saw that Microsoft.IntelliTrace.Profiler caused application errors.
The solution was disabling intellitrace:
Uncheck: Tools -> Options -> intelliTrace -> Enable intelliTrace