libplctag / libplctag.NET

A .NET wrapper for libplctag.

Home Page:https://libplctag.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to load DLL plctag or one of its dependencies

Primabase opened this issue · comments

Hi,

I've added Nuget libplactag pack to a WPF application. The scope is read/write tags of an Omron NX plc. All run well from my client where the application was created. I've published for the distribution. In the destination client was displayed the error in the title. plctag.dll is created every time I run the application. I've read about the option "forceextractlibrary" but I don't know how to implement. S.O. are win 11 Pro 23H2 22631.3447 in my client, Win 10 22H2 19045.4291 in the destination client. Any suggestion?

Not sure about your situation, but distributing a published WPF application has worked for me in the past - there may be additional information missing here. I see that you have had some success with this library in the past, what changed?

Have you tried this: https://github.com/libplctag/libplctag.NET?tab=readme-ov-file#developing-for-systems-with-immutable-application-directories

https://github.com/libplctag/libplctag.NET/blob/master/CONTRIBUTIONS.md#guidance-when-creating-an-issue

I've tried to add a Project Reference to plctag.dll but it cause an error: the reference is invalid or unsupported. This happens with x86 and x64 version. The target framework is .NET 8.0

plctag.dll is a native library, so the error you got in trying to add as a project reference is correct. Instead that library should be copied to the output directory.

Hi @Primabase - I trust that the above support was able to resolve your issue!