Corsinvest / cv4ab-api-dotnet

API for accessing Allen-Bradley PLC data over Ethernet Windows/Linux .NET Core
GNU General Public License v3.0
45 stars 23 forks source link

BadImageFormatException #11

Open DotNetFiver opened 4 years ago

DotNetFiver commented 4 years ago

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!

franklupo commented 4 years ago

Hi, Copy dll in root folder

best regards

DotNetFiver commented 4 years ago

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

franklupo commented 4 years ago

Hi, no, which DLL are you using?