We hit an issue while upgrading our application from MIP SDK 2017R3 to a newest MIP SDK version (MIP SDK 2018R3 and MIPS SDK 2020R2 versions have been tested).
A word about our application context:
Our application is composed of plug-ins consumed by a host application (SCADA type application).
Our plug-ins are .Net 4.5.2 based and use the MIP SDK component integration (ImageViewerControl) to provide video features inside the host application.
The host application is a native Winform application.
While using the MIP SDK 2017R3 everything works fine and video streams are correctly displayed.
However, to benefit from hardware acceleration, we had to switch to a newer MIP SDK version, and following the upgrade our video streams ceased to be displayed.
To migrate to a new SDK we had to switch our plug-ins to .Net 4.6 (required on some newer SDK version!) and we basically just installed the new SDK on the target machine and upgraded our post build event to use the new SDK provided batch files (copyUIFiles.bat). Nothing else was modified from our side!
Using MIP SDK 2018R3, we tracked down the issue to a missing file error related to “WPF” while calling Initialize() method on the ImageViewerControl:
System.Windows.Markup.XamlParseException: Could not load file or assembly ‘VideoOS.UI.Common.WPF, PublicKeyToken=bc60fba4a7969f89’ or one of its dependencies. The system cannot find the file specified. —> System.IO.FileNotFoundException: Could not load file or assembly ‘VideoOS.UI.Common.WPF, PublicKeyToken=bc60fba4a7969f89’ or one of its dependencies. The system cannot find the file specified.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at System.Windows.Baml2006.Baml2006SchemaContext.ResolveAssembly(BamlAssembly bamlAssembly)
at System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlTypeToType(BamlType bamlType)
at System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlType(BamlType bamlType, Int16 typeId)
at System.Windows.Baml2006.Baml2006SchemaContext.GetXamlType(Int16 typeId)
at System.Windows.Baml2006.Baml2006SchemaContext.GetPropertyDeclaringType(Int16 propertyId)
at System.Windows.Baml2006.Baml2006Reader.GetStaticExtensionValue(Int16 valueId, Type& memberType, Object& providedValue)
at System.Windows.Baml2006.Baml2006Reader.Process_PropertyWithExtension()
at System.Windows.Baml2006.Baml2006Reader.Process_OneBamlRecord()
at System.Windows.Baml2006.Baml2006Reader.Process_BamlRecords()
at System.Windows.Baml2006.Baml2006Reader.Read()
at System.Windows.Markup.WpfXamlLoader.TransformNodes(XamlReader xamlReader, XamlObjectWriter xamlWriter, Boolean onlyLoadOneNode, Boolean skipJournaledProperties, Boolean shouldPassLineNumberInfo, IXamlLineInfo xamlLineInfo, IXamlLineInfoConsumer xamlLineInfoConsumer, XamlContextStack`1 stack, IStyleConnector styleConnector)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
— End of inner exception stack trace —
at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at VideoOS.Platform.SDK.UI.DirectX.SmartClientVideoPlayer..ctor()
at VideoOS.Platform.SDK.UI.DirectX.ImageViewerDirectX..ctor()
at VideoOS.Platform.SDK.UI.SDKImageViewerControl.Create()
at VideoOS.Platform.SDK.PlatformImageViewerControl.Initialize()
However, the missing file is present in the target folder, so we guess one of its dependencies is not available, but which one? Using dependency walker (Depends.exe) on this did not help…
While using MIP SDK 2020R2, we tracked down the issue to another missing file error related to “toolkit*.dll” while calling Initialize() method on the ImageViewerControl:
VideoOS.Toolkit.FileException: Could not open file ‘ToolkitRendererPlugin_vr.dll or 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.GetVideoImageManager(Dispatcher dispatcher)
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()
CoreToolkits .dll is there but we could not find any ToolkitRendererPlugin_vr.dll anywhere including inside Milestone folder. Is this file really missing ?
What did we do wrong during our “SDK upgrades” that leads to the same issue (no more video displayed) ?
Once again the whole application is working fine using SDK 2017R3, what kind of changes were made to newer SDKs that could lead to this kind of issues ?
Any help would be much apreciated, we’ve been stuck on this for many monthes now.

Would this issue be possibly related to some changes made by Milestone to the ImageViewerControl to better support WPF in SDKs following 2017R3 ?