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.