I created a COM AddIn for Office 2013 and above using Visual Studio 2017. I moved to a new development machine and I registered the newly build AddIn using

regasm.exe c:\path\myAddIn.dll /codebase

I also added the registry entries for Outlook AddIns to be

"FriendlyName"="my outlook AddIn"
"Description"="my outlook AddIn"

But the AddIn is not loading. It appears in Outlook AddIn list, but gets not activated because of a loading error in mscoree.dll.

I activated Fusion logs and found this:

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable  C:\Program Files\Microsoft Office\Office16\OUTLOOK.EXE
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: DisplayName = myOLAddIn, Version=1.4.5878.0, Culture=neutral, PublicKeyToken=null
LOG: Appbase = file:///C:/Program Files/Microsoft Office/Office16/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
Calling assembly : (Unknown).
LOG: This bind starts in default load context.
LOG: Download of application configuration file was attempted from file:///C:/Program Files/Microsoft Office/Office16/outlook.exe.Config.
LOG: Found application configuration file (C:\Program Files\Microsoft Office\Office16\outlook.exe.Config).
LOG: Using application configuration file: C:\Program Files\Microsoft Office\Office16\outlook.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Office/Office16/myOLAddIn.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Office/Office16/myOLAddIn/myOLAddIn.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Office/Office16/myOLAddIn.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Office/Office16/myOLAddIn/myOLAddIn.EXE.
LOG: All probing URLs attempted and failed.

I sadly do not have a clue why it does not find the DLL. Instead, it only looks for it inside of the Outlook folder. But this is wrong. Registry codebase entries pointing to the correct location. Any idea why it does not look for the AddIn at the codebase points?

0 Answers