Environment: VS 2015 Community Edition Update 3; Outlook 2016; Windows 10 x64; latest patches applied for all.
When creating a new Outlook add-in using VSTO and C#, Visual Studio creates an empty project. (Due to the fact it's just boilerplate on an empty project I won't include it here.) However, attempting to launch this empty project leads to an immediate Outlook crash:
FatalExecutionEngineError occurred
Message: Managed Debugging Assistant 'FatalExecutionEngineError' has detected a problem in 'C:\Program Files (x86)\Microsoft Office\root\Office16\outlook.exe'.
Additional information: The runtime has encountered a fatal error. The address of the error was at 0x730e1302, on thread 0xfb4. 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've put breakpoints on both the InternalStartup
and ThisAddIn_Startup
methods; the exception gets thrown before either is hit. I've also tried building as x86, as x86_64, and as Any CPU
, to no avail.
Can anyone give me guidance on what's going wrong here?