Different version of CoreToolkit.dll in NuGet packages

Hi,

We are integrating the Milestone SDK into our building management software.

At runtime, following exception is thrown.

VideoOS.Toolkit.FileException: Could not open file ‘CoreToolkits.dll’!

at VideoOS.Toolkit.ToolkitFactory.CreateInstance(String configurationXml)

at VideoOS.UI.Common.WPF.VideoPlayer.Toolkit.ToolkitWrapper..ctor()

at VideoOS.UI.Common.WPF.VideoPlayer.Toolkit.VideoImage.VideoImageManager..ctor(Dispatcher dispatcher)

at VideoOS.UI.Common.WPF.VideoPlayer.Toolkit.VideoImage.VideoImageManager.GetVideoImageManagerForCurrentThread()

at VideoOS.UI.Common.WPF.VideoPlayer.Toolkit.VideoImage.VideoImage..ctor()

at VideoOS.UI.Common.WPF.VideoPlayer.Toolkit.ToolkitVideoSource..ctor(MainModel mainModel)

at VideoOS.UI.Common.WPF.VideoPlayer.VideoPlayer..ctor()

at VideoOS.Platform.SDK.UI.DirectX.SmartClientVideoPlayer.Initialize()

at VideoOS.Platform.SDK.UI.DirectX.ImageViewerDirectX.Initialize()

at VideoOS.Platform.SDK.UI.SDKImageViewerControl.Initialize()

at VideoOS.Platform.SDK.PlatformImageViewerControl.Initialize()

I could find an older question related to the same error but I couldn’t find a solution for our problem.

We are using following NuGet packages:

* MilestoneSystems.VideoOS.Platform (23.3.2)

* MilestoneSystems.VideoOS.Platform.SDK (23.3.2)

* MilestoneSystems.VideoOS.Platform.SDK.Debug (23.3.2)

* MilestoneSystems.VideoOS.ConfigurationAPI (23.3.1)

I found out that the dependencies of both MilestoneSystems.VideoOS.Platform.SDK and MilestoneSystems.VideoOS.Platform.SDK.Debug

contain CoreToolkits.dll. But the version of this dll is different:

* MilestoneSystems.VideoOS.Platform.SDK: CoreToolkits.dll → 23.3.51.1 (27.4Mb)

* MilestoneSystems.VideoOS.Platform.SDK.Debug: CoreToolkits.dll → 23.3.26.1 (66Mb)

I’m not sure if this is causing the issue but is there someone who can clear this out?

Best regards,

Bart

You should never use MilestoneSystems.VideoOS.Platform.SDK and MilestoneSystems.VideoOS.Platform.SDK.Debug at the same time.

Please try to build using only MilestoneSystems.VideoOS.Platform.SDK and let us know the outcome.

I uninstalled the MilestoneSystems.VideoOS.Platform.SDK.Debug package, made a clean build but the same error occurs.

Please verify that you build x64.

Did you do a clean and make sure you did not have a mix of dlls from different packages?

I am wondering, if you test if unmodified MediaRGBVideoEnhancementPlayback sample works for you, do you get the same error? The sample use the same BitmapVideoSource class.

https://doc.developer.milestonesys.com/html/index.html?base=samples/componentsamples/mediargbvideoenhancementplayback/readme.html&tree=tree_search.html?search=mediargbvideoenhancementplayback

Yes.

I deleted the bin and obj directories. I deleted the packages directory and did a restore.

Then I rebuild our solution (x64).

The sample you mentioned is working.

I checked the versions of all the dlls. There was one difference → VideoOS.Platform.dll

This dll had version 23.3.28.1 in our solution and had version 23.3.25.1 in the sample.

Another difference is that in our application the dlls of this integration are loaded from a sub directory of our application.

The last is what I must suspect is making the difference. The dll is loading late and if the current directory in your app has changed then it is not found.

The difference in dll version is an issue that was discovered very recently, that sample reference Milestonesys.VideoOS.Platform.SDK NuGet getting the newest, this in turn reference Milestonesys.VideoOS.Platform NuGet but does currently not get the newest. Milestone will fix this. This issue is not what is causing the exception you are struggling with here.