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?
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.
- Tools -> Options -> Debugger
- Uncheck: Enable implicit property evaluation
- Uncheck: Enable Just My Code
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.