Exception from HRESULT: 0x8007000B using DLLs with and without provided code

0

I'm building app with provided SDK that has open source part and not open source one. I'm getting BadImageFormatException - Exception from HRESULT: 0x8007000B error.

I know that BadImageFormatException is thrown when you use x64 on x86 and vice versa. Tried building project for x64 first. Didn't work and got this exception. Changed to x86 and got somewhat different BadImageFormatException (I got HRESULT and error code part unlike when tried x64).

x86

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

System.BadImageFormatException: 'Could not load file or assembly 'NetSDKCS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.'

So, if closed part of code is x86 it should work on x86 since I can compile in both x64 and x86... Similar if closed part is x64.

Any ideas?

dll
badimageformatexception
asked on Stack Overflow Dec 9, 2019 by Vladimir Cvetkovic • edited Dec 9, 2019 by Vladimir Cvetkovic

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0