Error when starting Windows service which connects to Milestone SDK

I’ve installed our home-made software on a new server, but when starting the service it fails to start and in Windows Eventviewer there is a error:

System.BadImageFormatException: Could not load file or assembly 'VideoOS.Platform.SDK.Export

The service is build correct, because it runs smootly on 5 other machines.

The only difference between the new server and the other is that the Milestone Datacollector Service is stopped.

When I try to start it, it stops with a error in the datacollector log:

2019-01-14 15:59:42.062+01:00 [ 6] ERROR - DataCollectorThreadFunction error, ex: System.IO.FileNotFoundException: Could not load file or assembly ‘VideoOS.Platform.MediaProcessing.dll’ or one of its dependencies. The specified module could not be found.

File name: ‘VideoOS.Platform.MediaProcessing.dll’

at VideoOS.DataCollector.Media.NvidiaInformationWrapper..ctor()

at VideoOS.DataCollector.Service.CounterStateManager..ctor(DataCollectorEngine engine)

at VideoOS.DataCollector.Service.DataCollectorEngine..ctor()

at VideoOS.DataCollector.Service.DataCollectorService.DataCollectorServiceThreadFunction()

Someone any idea what is wrong?

You need to have the dependent files in the right folder. Try to see if these threads contains the hint that will help you solve this.

https://developer.milestonesys.com/s/question/0D50O00005E0gadSAB/how-to-properly-include-references-for-videoosplatform-and-other-milestone-libraries-in-a-net-project

https://developer.milestonesys.com/s/question/0D50O00003wdUT5SAM/videoosplatformsdkexportenvironmentinitialize-throws-filenotfoundexception-on-videoostoolkitdll

https://developer.milestonesys.com/s/article/Error-messages-display-when-you-run-MIP-based-standalone-applications

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

Thanks for the hints. Somehow rebuilding my Project in Visual Studio did the trick.

Maybe a incorrect resource folder was causing the issue,