Skip to content

Failed to load required native libraries in an outlook plugin

Summary

I receive the exception on the following line of code:

Core.Initialize();

Minimal project and steps to reproduce

My project is an Outlook add-in.

I am unsure how to reproduce it outside of this project. I created a brand new standalone solution and the same relative source code / method calls to the LibVLCSharp player worked.

Unfortunately, I am not able to share the project through git. It belongs to my employer and it is a commercial solution.

What is the current bug behavior?

The following exception:

LibVLCSharp.Shared.VLCException HResult=0x80131500 Message=Failed to load required native libraries. Have you installed the latest LibVLC package from nuget for your target platform?

On this line of code:

Core.Initialize();

What is the expected correct behavior?

It should run; simply pass through and continue.

Does it work on other plaforms? Does it work with the official VLC apps?

It runs in a separate, small standalone exe that I recreated.

Relevant LibVLC logs and/or screenshots

Additional info from the exception:

Search paths include C:\Users[username]\AppData\Local\assembly\dl3\P50TL99W.754\3X11G5QJ.WPH\68283a9c\0075d653_ce66d901\libvlc\win-x64\libvlc.dll,C:\Users[username]\AppData\Local\assembly\dl3\P50TL99W.754\3X11G5QJ.WPH\68283a9c\0075d653_ce66d901\libvlc\win-x64\libvlccore.dll; C:\Users[username]\AppData\Local\assembly\dl3\P50TL99W.754\3X11G5QJ.WPH\68283a9c\0075d653_ce66d901\libvlc\win-x64\libvlc.dll,C:\Users[username]\AppData\Local\assembly\dl3\P50TL99W.754\3X11G5QJ.WPH\68283a9c\0075d653_ce66d901\libvlc\win-x64\libvlccore.dll; C:\Users[username]\AppData\Local\assembly\dl3\P50TL99W.754\3X11G5QJ.WPH\68283a9c\0075d653_ce66d901\libvlc.dll, Source= StackTrace:

Environment

  • OS: Windows 11 Home
  • Version 22H2
  • Device: Lenovo laptop
  • LibVLC version and architecture
  • LibVLCSharp version
  • LibVLCSharp 3.7.0
  • LibVLCSharp.WinForms 3.7.0
  • VideoLAN.LibVLC.Windows 3.0.18

Possible fixes

It appears this issue has come up a number of times before:

https://stackoverflow.com/questions/67486438/libvlcsharp-failed-to-load-required-native-libraries

https://stackoverflow.com/questions/66935123/c-sharp-wpf-vlc-libvlcsharp-shared-vlcexception-failed-to-load-required-na

#454

https://stackoverflow.com/questions/38594837/visual-studio-c-sharp-sqlite-interop-dll-not-found

https://stackoverflow.com/questions/38594837/visual-studio-c-sharp-sqlite-interop-dll-not-found

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information