VideoOS.Platform.SDK.Export.dll, fail to load library when running as a service

Hi we have a process that take a snapshot, it uses the “VideoOS.Platform.SDK.Export.dll” when we ran the process as an app all works fine.

when we change the process to run as a windows service every time that it need to take a snap shot we get missing library with the dll “VideoOS.Platform.SDK.Export.dll” name.

('Missing library: VideoOS.Platform.SDK.Export.dll)

any known reason why it behave like this?

You need to include the dll files that are used by the “VideoOS.Platform.SDK.Export.dll”. The dll files needed are the ones from the CopyExportFiles.

Ref.: https://doc.developer.milestonesys.com/html/index.html?base=reference/architecture/net_library_initialization.html&tree=tree_2.html

We are speculating that you need these files in the current folder when you execute your service, we have seen issues where the current folder is no longer the expected folder, we suggest that you catch the exception, and when the exception is caught you get the current folder and logs it.

Hi Bo,

we have all the DLL’s in the folder.

see attached picture.

as i mentioned if i am running the app normally and not as a service all works fine.

it happens only when running as a service.

This screen capture does not show us that this is the current folder when your service needs the dlls. What I say is that I suspect that the current folder where the service looks for the dlls might have changed because you now have a service not a regular application.