Seeing "Could not load file or assembly 'Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. Access is denied." error on Outlook 2013 with Win10 machines

Add-in Express™ Support Service
That's what is more important than anything else

Seeing "Could not load file or assembly 'Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. Access is denied." error on Outlook 2013 with Win10 machines
 
Subscribe
EnterpriseDev




Posts: 65
Joined: 2016-07-01
I am seeing the error below for multiple independent customers who all are running Win10 with Outlook 2013. It only happens on clean machines, and it started happening in May 2019. Restarting or reinstalling Outlook does not seem to help.

Could not load file or assembly 'Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. Access is denied.

The "Microsoft.Office.Interop.Outlook.dll" is present in Program Files (x86), and the key to the error message seems to be "Access is defined" at the end of the error string.

How would you debug this on a customer's machine? Have you seen this before? Any clue?
Posted 18 Jun, 2019 06:59:39 Top
Dmitry Kostochko


Add-in Express team


Posts: 2839
Joined: 2004-04-05
Hello,

We faced similar issues but with 2016 version of Outlook and Excel. Usually, after successful installation or update of Office applications, their Primary Interop Assemblies (PIAs) are located in GAC:
C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.Outlook\15.0.0.0__71e9bce111e9429c\
C:\Windows\assembly\GAC_MSIL\Microsoft.Vbe.Interop\15.0.0.0__71e9bce111e9429c\
C:\Windows\assembly\GAC_MSIL\office\15.0.0.0__71e9bce111e9429c\

Please check these locations on your customer's machine, probably you will find something abnormal.


If your add-in targets .NET Framework 4.0 or higher, you can set the "Embed Interop Types" property for all interops to True. This will embed all used Office types into your assembly, and interop assemblies (Microsoft.Office.Interop.Outlook.dll, Microsoft.Vbe.Interop.dll, Office.dll) will become unnecessary.
Posted 18 Jun, 2019 08:52:01 Top
Bargholz Thomas




Posts: 242
Joined: 2006-12-18
We had similar issues on multiple client computers (but far from all).
It seems to be related to an issue with the .NET framework after a Windows (or Office) update which started rolling out in may.

What have fixed it for us are either running the Microsoft .NET Framework Repair Tool, or applying this patch to .NET Framework: https://support.microsoft.com/da-dk/help/4503864/cumulative-update-for-net-framework-june-18-2019

Regards
Thomas
Posted 11 Jul, 2019 02:04:59 Top
Andrei Smolin


Add-in Express team


Posts: 16568
Joined: 2006-05-11
Hello Thomas,

Thank you for sharing this info!

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 11 Jul, 2019 04:11:50 Top