Error when trying to generate ImageViewer control

I am following the eLearning course “Developing MIP SDK Component Integrations”.

At the section on “SimpleVideoViewer”, I can open the ItemPicker to see all the cameras. But after selecting a camera and click OK, this error appeared,

Exception: System.IO.FileLoadException: Could not load file or assembly ‘ImageViewerDotNet_axinterop, Version=10.2.1.2324, Culture=neutral, PublicKeyToken=bc60fba4a7969f89’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

See complete error message in the attached image.

The error is from this line of code:

imageViewerControl = ClientControl.Instance.GenerateImageViewerControl()

I am using the following:

MIP SDK 2017 R1

XProtect Corporate 2017 R1 (11.1a)

Visual Studio Professional 2015

Windows 10 Pro

How can I solve this problem? Thanks

See - https://force.milestonesys.com/support/articles/en_US/How_To/Dependent-files-in-MIP-SDK

Hi Bo, thanks for the reply.

The solution you provided was one of the step in the eLearning video and I had already done it. The required DLL are in the project.

The error I am getting is not “System.IO.FileNotFoundException” but rather

“Exception: System.IO.FileLoadException”

In the error message, the file version mentioned is v10.2.1.2324

But the version I have is 11.1.1.3880

Could this be the cause of the error?

It works for me.

I wonder if you can try to register the dll (with regsvr32)? - https://force.milestonesys.com/support/articles/en_US/Troubleshootings/Class-not-registered

If you from the MIP SDK run the VideoViewer sample, unmodified, does it fail in the same way?

The Milestone Smart Client, if running in this PC with the same camera etc., does it work as expected?

Hi Bo,

Tried what you suggested but the error still persists.

Finally, I decided to uninstall the SDK, redownload and reinstall it.

The code is now working as expected! Thanks for your time and help!