Failed to load required native libraries exception in an Outlook plugin / add-in

62 Views Asked by At

We have an Outlook add-in which is failing to run 3rd party media player controls on a WinForm:

"Could not load file or assembly" or "Failed to load required native libraries"

We tried posting out on the Github repos:

https://github.com/SuRGeoNix/Flyleaf/issues/308

https://code.videolan.org/videolan/LibVLCSharp/-/issues/611#note_386617

We also tried copying dll's etc. It seems to be with the actual loading process or permissions in some way.

The media players are not running.

1

There are 1 best solutions below

0
On

Outlook for desktop is a platform specific application which has x86 and x64 editions. Depending on the edition used you need to load a platform-specific assembly at runtime. For example, if you have Outlook x64 installed you need to make sure the x64 edition of your third-party assembly is used in the add-in. Such exceptions are a good indicator:

"Could not load file or assembly" 

or

"Failed to load required native libraries"