3 Replies Latest reply on Jun 15, 2017 1:25 PM by Intel Corporation

    BadImageFormatException, when trying to run C# project - Intel realsense SDK

    zaholk

      Every time i try to compile i'm getting this error:

      1. System.BadImageFormatException: 'An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)'

      when i try to run session = PXCMSession.CreateInstance();

      I'm running Windows 10 pro, 32 bit operating system.

      Added reference to file:

      c:\Program Files\Intel\RSSDK\bin\win32\libpxcclr.cs.dll

      added to post build evenent:

      if "$(Platform)" == "x86" ( copy /y "$(RSSDK_DIR)\bin\win32\libpxccpp2c.dll" "$(TargetDir)" ) else ( copy /y "$(RSSDK_DIR)\bin\x64\libpxccpp2c.dll" "$(TargetDir)" )

      And in build tab changed platform target from Any CPU to X86