SQLitePCL.raw icon indicating copy to clipboard operation
SQLitePCL.raw copied to clipboard

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

Open ericsink opened this issue 3 years ago • 1 comments

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 avatar Sep 18 '22 19:09 ericsink

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.

ericsink avatar Sep 19 '22 15:09 ericsink