0

I'm embedding multiple 3rd party managed and unmanaged dlls into one dll.

That single dll gets picked up and injected into another host application at runtime ussing Assembly.Load The entire thing is supposed to work as a host with plugins thing. (just to clarify)

I have it working for all dlls (managed, unmanaged and mixed) except for one: VideoOS.Platform.SDK.Export, for which I get dll not found exception on runtime, the dll is from Milestone NVR SDK

I've tried:

  • putting it as IncludeAssemblies, Unmanaged32Assemblies and Unmanaged64Assemblies
  • toggling: compression, temp files on disk
  • manually loading it from the resources with: AppDomain.CurrentDomain.AssemblyResolve
  • decompiling the library itself with (Reflector, DotPeek, ILSpy) they all turn up with issues, so I'm thinking it's probabbly some pinvokes or similar that they can't decompile.

Notes:

  1. The whole process works when the dll is in the same folder as the host app exe but not when it's embededd
  2. I had an issue with a referenced library that started working when put in Unmanaged32Assemblies was resolved OK
MarkovskI
  • 1,489
  • 2
  • 21
  • 25
  • Pleasy specify some code for manual AssemblyResolve event – eocron Nov 23 '17 at 21:18
  • Used this code: https://blogs.msdn.microsoft.com/microsoft_press/2010/02/03/jeffrey-richter-excerpt-2-from-clr-via-c-third-edition/ , triple checked resource name, it gets loaded without any problems, but the exception persists – MarkovskI Nov 23 '17 at 21:20
  • Is it called for this dll? Did you check that ResolveEventArgs.Name contains your "VideoOS.Platform.SDK.Export" name when event is called? – eocron Nov 23 '17 at 21:31
  • Yes, and its found in the resources, read (checked stream length on debug), and loaded – MarkovskI Nov 23 '17 at 21:35

0 Answers0