ericsink / SQLitePCL.raw

A Portable Class Library (PCL) for low-level (raw) access to SQLite
Apache License 2.0
512 stars 106 forks source link

With RID win-x86 (32-bit), targeting net6.0-windows works but net6.0 (plain) has problems #518

Open ericsink opened 1 year ago

ericsink commented 1 year ago

The function pointer providers have support for 32-bit Windows calling conventions, but that version is currently selected by TFM, not by RID. So, if you want to use 32 bit Windows and you target net6.0 plus the RID win-x86, you will get the version of the provider without those necessary calling convention fixes.

ericsink commented 1 year ago

In the future, we should probably go back to doing the function pointer calling conventions fix the way that @filipnavara originally did it: making it effective on all platforms instead of just Windows.

The problem was that this broke things on net6.0-ios, because the Mono AOT compiler couldn't handle the CallConvs setting on UnmanagedCallersOnly attribute. So I fixed the code generator to include that fix only for Windows.

But that AOT bug has apparently been fixed in .NET 7.0: dotnet/runtime#69759

At the moment, I'm not sure I want to require .NET 7 minimum, since it is not an LTS release.