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

Unable to load DLL PicTag #8

Open DotNetFiver opened 4 years ago

DotNetFiver commented 4 years ago

Hi, I've created a new Net core 3.1 project and pasted in some code behind a button click just to step through the code, the tag I tested in another app previously.

I added Corsinvest using Nuget console

I get the error here:

dll

I'm using Visual Studio Preview 16.5 but I can use earlier stable version if required Thanks in advance

MattCosturos commented 4 years ago

Having the same issue here. When I made a simple dotnet core Console application I didn't have this problem. Using VSCode image

When I tried to make a WinForm application I get the same error as you using VStudio.

MattCosturos commented 4 years ago

If you make a simple dotnet core console project you can copy the plctag.dll into your vstudio project and it works.

OlegUA commented 4 years ago

I have the same issue. VS2019, NuGet version of this assembly is 0.1.7. I've created standard WinForm application. Also, I've tried to put plctag.dll to the project folder. Nothing helped.

MattCosturos commented 4 years ago

You need to put plctag.dll inside the /bin/Debug folder (next to the .exe that is built)

franklupo commented 4 years ago

You need to put plctag.dll inside the /bin/Debug folder (next to the .exe that is built)

Hi, good. i am trying to fix it

Best regards

john10e commented 4 years ago

I'm running into this same issue with a .NET Core 3.1 Console project in VS2019, Win10. I've tried copy the different runtime versions of plctag.dll into the debug folder, changing the platform (x64, x86, Any CPU). I either get a BadImageFormatException (x86) or DllNotFoundException (x64). Please advise.

image

john10e commented 4 years ago

Update: I copied the plctag.dll from another project (https://github.com/libplctag/libplctag.NET) into the debug folder shown below and now it works: image

franklupo commented 4 years ago

Hi all, sorry but I'm very busy working. In the coming weeks I will update the project with the new dll.

Best regards

kapatil2602 commented 4 years ago

VC++ redistributable x86 worked for me Thanks,