libplctag / libplctag.NET

A .NET wrapper for libplctag.
https://libplctag.github.io/
Mozilla Public License 2.0
194 stars 49 forks source link

DotNetFramework can not work #380

Closed njsunsky closed 1 week ago

njsunsky commented 2 weeks ago

The exception thrown: "System.IO.FileNotFoundException" (occurred in libplctag.dll)

An unhandled exception of type 'System.IO.FileNotFoundException' occurred in libplctag.dll Could not load file or assembly 'libplctag.NativeImport, Version=1.0.39.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

timyhac commented 2 weeks ago

My assumption is that you downloaded the repository and are attempting to run the CSharp DotNetFramework project.

I'm not sure when this error started happening but it seems like the transitive dependency libplctag.NativeImport isn't being brought in when libplctag.NET (primary .NET wrapper package) is project reference as opposed to a nuget package reference.

You should be able to get around the issue by installing either of the nuget packages.

njsunsky commented 1 week ago

@timyhac thanks ,you are right ,i install either of the nuget packages ,it works well