Could not load file or assembly VideoOS.Platform.SDK.Media

Hi,

I have the following error when I’m tring to run the following code:

Error:

Could not load file or assembly 'VideoOS.Platform.SDK.Media'

Code:

VideoOS.Platform.SDK.Media.Environment.Initialize();

I have added the following refs to the project :

  • VideoOS.Platform
  • VideoOS.Platform.SDK
  • VideoOS.Platform.SDK.Export
  • VideoOS.Platform.SDK.Media

Which can be found at:

" [C:\Projects\milestone-sdk-c\MilestoneVideoStream\lib\](file:C:/Projects/milestone-sdk-c/MilestoneVideoStream/lib/) "

(indicates that those were not imported directly from program files)

In addition this is the script running after each build

cd "C:\Program Files\Milestone\MIPSDK\Bin"
call CopyMedia.bat "$(TargetDir)"
call CopyExportFiles.bat "$(TargetDir)"

I have installed MIPSDK 2019R2

Do you have any clue?

Thanks.

I finally found a solution!

I had to change Platform target to x64 from Any CPU (in visual studio).