Outlook 加载项从 Outlook 2007 迁移到 2010 时出现 FatalExecutionEngineError

发布于 2024-09-04 18:26:06 字数 1215 浏览 6 评论 0原文

我正在尝试将 Outlook 2007 加载项迁移到 Outlook 2010 和 Visual Studio 2010。我已完成这些文档中描述的所有操作:

运行迁移到 .NET Framework 4 的 Office 项目所需的更改

更新迁移到 .NET Framework 4 的 Outlook 项目中的表单区域

更新迁移到 .NET Framework 4 的 Office 项目中的功能区自定义

现在,在 .NET 4.0 中构建一切都不会出现错误。但是,当我将插件加载到 Outlook(使用从 VS 运行)时,它会显示第一个屏幕(我的插件在第一次运行时显示某种启动屏幕),并且在它立即给出 FatalExecutionEngineError 后。因此,该加载项在 Outlook 中加载良好,但启动后不久就崩溃了。

错误消息没有提供太多详细信息,我不知道应该从哪里开始调试。看起来此错误不是由特定代码行引起的,因为 Visual Studio 无法显示它的源代码。

完整错误消息:

FatalExecutionEngineError was detected
The runtime has encountered a fatal error. The address of the error was at 
0xede42270, on thread 0xc48. 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.

I'm trying to migrate my Outlook 2007 add-in to Outlook 2010 and Visual Studio 2010. I've done everything that is described in these documents:

Required Changes to Run Office Projects that You Migrate to the .NET Framework 4

Updating Form Regions in Outlook Projects that You Migrate to the .NET Framework 4

Updating Ribbon Customizations in Office Projects that You Migrate to the .NET Framework 4

Everything builds without an error in .NET 4.0 now. But when I load the plugin to Outlook (using Run from VS) it shows first screen (my addin shows kind-of splash screen on first run) and immediately after it gives me FatalExecutionEngineError. So the add-in loads fine in Outlook but it crashes shortly after start.

Error message doesn't give too much details and I don't know where should I even begin debugging that. Looks like this error is not caused by a specific line of code because Visual Studio cannot show source for it.

Full error message:

FatalExecutionEngineError was detected
The runtime has encountered a fatal error. The address of the error was at 
0xede42270, on thread 0xc48. 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

べ映画 2024-09-11 18:26:06

我终于解决了这个问题。可能不是最好的方法,但它有效,而且我可以从 Visual Studio 调试我的应用程序。

在 Visual Studio 中,转到调试/异常...。然后找到并取消标记这些 FatalExecutionEngineError 设置的 Thrown 复选框(在托管调试助手 分支中),就是这样。

I've finally dealt with this problem. Probably not the best way to do it but it works and I can debug my app from Visual Studio just fine.

In Visual Studio go to Debug/Exceptions.... Then find and unmark Thrown checkbox for these FatalExecutionEngineError setting (in Managed Debugging Assistants branch) and that's it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文