c# - 重新启动调试 session 后出现 FatalExecutionEngineError

标签 c# visual-studio iis-express visual-studio-debugging

几周(几个月?)以来,在 Visual Studio 2017/2019 Enterprise 中重新启动我的 ASP.NET 应用程序后,我有时会遇到以下异常。只有当 IIS Express 已经在运行我的应用程序并且我需要在重新编译后启动新的调试 session 时才会发生这种情况。

每当发生这种情况时,我都必须终止 IIS Express (taskkill/f/im iisexpress.exe) 并在 VS 中启动一个新的调试 session 。我不知道是什么触发了这个问题。某天它开始在 VS 2017 Enterprise 上发生。也许是因为我收到了一些 Win10 更新?升级到 VS 2019 Enterprise 没有解决问题。

Managed Debugging Assistant 'FatalExecutionEngineError'
Message=Managed Debugging Assistant 'FatalExecutionEngineError' : 'The runtime has encountered a fatal error. The address of the error was at 0x45b30496, on thread 0x16b8. 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.'

报告了一些类似的问题,但要么没有解决我的问题,要么不适用:

最佳答案

我不确定我是在哪里读到这篇文章的,但显然 .NET Framework 4.7.x 中有一个错误导致了这个问题。升级到 .NET Framework 4.8 解决了这个问题。 (项目继续目标4.6.2)

关于c# - 重新启动调试 session 后出现 FatalExecutionEngineError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56042920/

相关文章:

asp.net - IIS Express applicationhost.config - 身份验证错误

c# - 如何测试在启动期间设置的 Polly 重试策略?

c# - 如何将焦点设置到 WPF 工具包数据网格的特定单元格

c# - 具有附件突出显示功能的客户端 .Net Nest

c# - 对项目的 Visual Studio 修改未更新\bin 中的 .exe 文件

debugging - 无法开始调试。 Visual Studio 2012 一次调试后提示

c# - 使用 Linq 的 foreach 循环条件

visual-studio - 为什么 "Alt Gr + {"在VS 2015 RC中打开Task Runner

c# - 如何解决 "The breakpoint will not currently be hit. No symbols have been loaded for this document."警告?

C# ASP.NET TempData 正在运行,但现在它不在 3 台计算机中的 2 台上