I have a Windows service that makes use of the EMGU.CV nuget package.
I can install as a web service perfectly happily on my dev machine (Windows 10) with installutil and everything works beautifully.
When I try and install the same service on a server (Windows Server 2012) everything appears okay but I hit an exception as soon as I try to call a constructor from a DLL ...
Outer exception: The type initializer for 'Emgu.CV.CvInvoke' threw an exception.
Inner exception: Unable to load DLL 'cvextern': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
The service is running under the local system account.
I'm sure I'm overlooking something very obvious here, but ...
What I have tried:
I have tried copying the appropriate DLLs into Windows/system32
I've also tried changing the working directory at the top of my OnStart():
Environment.CurrentDirectory = AppDomain.CurrentDomain.BaseDirectory;
Neither has worked.