[Solved] Visual C# 2019 + RealSence D435 | Nuitrack.init error

Hi,

I work with Microsoft Visual Studio 2019 and a RealSence D435.

My environment details

  • Windows 10 x64
  • Intel RealSense D435
  • Visual Studio 2019
  • Nuitrack Runtime 0.29.0 (x64)
  • Nuitrack SDK 1.4.0
  • Nuitrack Trial License

I build my project with Visual C# 2019. I get an exception as below when i call Nuitrack.init(“”).

System.BadImageFormatException
HResult=0x8007000B
Message=An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
Source=nuitrack.net
StackTrace:
at nuitrack.NativeImporter.nuitrack_InitializeFromConfig(String config)
at nuitrack.NativeNuitrack.Init(String config)
at nuitrack.Nuitrack.Init(String config, NuitrackMode mode)

Does anyone encounter the same problem?
Thank you in advance.

Problam Solved.

Set “Target platform” to x64 in project’s properties.

Thank you.