VideoOS.Platform.SDK.UI.dll is targeting AMD64 architecture. Why?

Hi

I’m struggling to incorporate Download MIP SDK 2020 R1 - Redistributable Installer x86 into my 32bit x86 project since VideoOS.Platform.SDK.UI.dll is targeting AMD64 architecture.

BUILD WARNING:

1>[C:\Program](file:C:/Program) Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built “x86” and the processor architecture of the reference “VideoOS.Platform.SDK.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bc60fba4a7969f89, processorArchitecture=AMD64”, “AMD64”. This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

RUNTIME EXCEPTION:

Could not load file or assembly ‘VideoOS.Platform.SDK.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bc60fba4a7969f89’ or one of its dependencies. An attempt was made to load a program with an incorrect format.

Any ideas (other than switching to 64bit, which I can’t do)?

Thanks

I do not see this issue. I took the VideoViewer sample and exchanged the referenced dll’s with the ones from the (32-bit) MIP SDK bin folder, made VS build x86, and it builds as expected. I made a post-build event to copy the dlls from the bin folder and the application runs. I see an issue when opening a camera / initializing the ImageViewerControl, and I will follow up on this.

I find that VideoOS.Platform.SDK.UI.dll is “AnyCpu”, can you please describe what you have done to see this?

The issue i experienced is that CoreToolkits.dll in x86 depends on J2KCoreX.dll, but doesn’t in x64 and thus the copy statement for that files has been removed from the copy*.bat files. After manually copying the J2KCoreX.dll from the 32 bit SDK bin folder to the application I never saw any issue and the sample worked without flaw.

Does changing references and copying the dlls solve it for you?

Hi. Yes. Thank you :slight_smile:

I wasn’t using your sample code as I was trying to migrate an existing application. I’d omitted the step to copy dependant DLLs - I’d obviously added refs to the ones required to complete the code. And it’s unfortunate that the error messages don’t relate to the loading of the dependant DLL - just to the specified/imported ones.

Perhaps you could make the docs a bit clearer, though. Or better still, have you considered using NuGet to package up all the dependencies?

Thank you for the feedback.

I think the documentation is OK, but I think we have a general problem in how to lead the developers to the right information at the right time..

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

Yes, NuGet is being considered. There is no committed plan yet but it is being considered.