views:

15

answers:

1

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.
A: 

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.

RaYell