当我在“工具”->“选项”->“调试”->“常规”下打开“使用托管兼容模式”选项时,错误框更改为以下内容:
有任何线索吗?我正在使用 Visual Studio 2015。
托管调试助手“FatalExecutionEngineError”:“运行时遇到致命错误。错误的地址是 0x641ad419,在线程 0x5d0c 上。错误代码是 0xc0000005。此错误可能是 CLR 或用户代码的不安全或不可验证部分中的错误。此错误的常见来源包括 COM 互操作或 PInvoke 的用户封送错误,这可能会破坏堆栈。
这似乎只在使用 Asp.Net Core 1.1 时发生,并且只发生在 .net 的实体框架中(不是 EF Core)。它也不会一直发生,但是当它发生时总是在 EF 调用期间。
我已经尝试启用“使用托管兼容模式”,如here所述,但似乎没有什么区别。
entity-framework visual-studio visual-studio-2017 asp.net-core-1.1
Since a few weeks (months?) I've been sometimes getting the following exception after restarting my ASP.NET application inside Visual Studio 2017 / 2019 Enterprise. It only happens when IIS Express was already running my application and I needed to start a new debug session after recompiling.
每当发生这种情况时,我都必须终止 IIS Express ( taskkill /f /im iisexpress.exe) 并在 VS 中启动新的调试会话。我无法弄清楚是什么触发了这个问题。有一天,它开始在 VS 2017 Enterprise 上发生。也许是因为我收到了一些 Win10 更新?升级到 VS 2019 Enterprise 并没有解决问题。
托管调试助手“FatalExecutionEngineError”
消息=托管调试助手“FatalExecutionEngineError”:“运行时遇到致命错误。错误的地址位于线程 0x16b8 上的 0x45b30496。错误代码为0xc0000005。此错误可能是 CLR 中的错误或用户代码的不安全或不可验证部分中的错误。此错误的常见来源包括 COM 互操作或 PInvoke 的用户编组错误,这可能会损坏堆栈。
报告了一些类似的问题,但要么不能解决我的问题,要么不适用: …
在我这一行的程序中:
int value = MTEConnect(auth_string, err);
Run Code Online (Sandbox Code Playgroud)
我收到这样的例外:
FatalExecutionEngineError
The runtime has encountered a fatal error. The address of the
error was at 0x68c8a681, on thread 0x2334. The error code is
0xc0000005. This error may be a bug in the CLR or in the unsafe
or non-verifiable portions of user code. Common sources of this
bug include user marshaling errors for COM-interop or PInvoke,
which may corrupt the stack.
Run Code Online (Sandbox Code Playgroud)
MTEConnect 是这样导入的:
[DllImport("mtesrl.dll", CharSet = CharSet.Ansi)]
private static extern int MTEConnect(String pars, …Run Code Online (Sandbox Code Playgroud)