cv4ab-api-dotnet icon indicating copy to clipboard operation
cv4ab-api-dotnet copied to clipboard

BadImageFormatException

Open DotNetFiver opened this issue 4 years ago • 3 comments

I know this has been hinted at as a problem previously, but I'm not able to solve it I have cloned the solution directly into VS and changed the IP of the PLC to one thats relevant to me

The first call to code which uses the NativeLibrary fails with BadImageFormatException:

image

Everything is 64 bit as is the plctag.dll reference

I have installed a couple of VC++ components into VS in case that is the issue, something about dlls that the plctag.dll depends on? But that hasn't worked

Any help appreciated!

DotNetFiver avatar Jun 09 '20 15:06 DotNetFiver

Hi, Copy dll in root folder

best regards

franklupo avatar Jun 09 '20 16:06 franklupo

Thanks for your reply, okay so I tried that, I now have the dll in both projects:

image

At least now I have a different error so that would be progress. is there anything I should add which plctag.dll depends on that I don't know about?

Thanks again

DotNetFiver avatar Jun 09 '20 16:06 DotNetFiver

Hi, no, which DLL are you using?

franklupo avatar Jun 11 '20 14:06 franklupo