libplctag.NET icon indicating copy to clipboard operation
libplctag.NET copied to clipboard

Support to MAUI

Open ElegantCatterpillar opened this issue 1 year ago • 2 comments

Im trying to used in MAUI and get this error:

System.TypeLoadException: Unknown platform at libplctag.NativeImport.LibraryExtractor.GetAppropriateLibraryInfo() in //src/libplctag.NativeImport/LibraryExtractor.cs:line 90 at libplctag.NativeImport.LibraryExtractor.ExtractAppropriateLibraryToDirectory(String outputDirectory) in //src/libplctag.NativeImport/LibraryExtractor.cs:line 43 at libplctag.NativeImport.LibraryExtractor.Init(Boolean forceExtract) in //src/libplctag.NativeImport/LibraryExtractor.cs:line 25 at libplctag.NativeImport.plctag.ExtractLibraryIfRequired() in //src/libplctag.NativeImport/plctag.cs:line 59 at libplctag.NativeImport.plctag.plc_tag_create_ex(String lpString, callback_func_ex func, IntPtr userdata, Int32 timeout) in //src/libplctag.NativeImport/plctag.cs:line 94 at libplctag.NativeTag.plc_tag_create_ex(String lpString, callback_func_ex func, IntPtr userdata, Int32 timeout) in //src/libplctag/NativeTag.cs:line 20 at libplctag.NativeTagWrapper.InitializeAsync(CancellationToken token) in //src/libplctag/NativeTagWrapper.cs:line 406 at libplctag.Tag`2.<InitializeAsync>d__46[[libplctag.DataTypes.BoolPlcMapper, libplctag, Version=1.5.2.0, Culture=neutral, PublicKeyToken=null],[System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext() in //src/libplctag/TagOfT.cs:line 169

ElegantCatterpillar avatar Aug 24 '24 00:08 ElegantCatterpillar

It works on my machine - if I create a new MAUI app and just run it will all default settings, it works fine 😛

But in all seriousness there is a lot more detail that you could be adding. MAUI is a cross-platform framework so I could take a guess that you are running this on something other than windows, macOS or linux which are the version of libplctag core that are bundled with libplctag.NET.

Please see the CONTRIBUTING guidelines for additional detail to add.

timyhac avatar Aug 24 '24 06:08 timyhac

I am trying to use it on Android, but I get an error from the library that it cannot Extract the library, specifically the error I get is the one at the top which mentions that it does not recognize the platform it is running on.

ElegantCatterpillar avatar Aug 25 '24 00:08 ElegantCatterpillar