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

Figure out new-style tfm multi-targeting for UWP #450

Closed ericsink closed 2 years ago

ericsink commented 2 years ago

Yes, something in the provider package needs to change… I’m just not sure what. Maybe multi-target net5.0-windows in addition to uap10.0? I’m not sure how MSIX-packaging, appcontainers, and NuGet all interact to pick the assets. I haven’t seen any official guidance yet, but it was pretty sparse in UWP too.

Originally posted by @bricelam in https://github.com/dotnet/efcore/issues/24213#issuecomment-924454409

ericsink commented 2 years ago

One related thing I have noticed: I'm using the uap10.0 TFM all over the place with the assumption that it supports netstandard2.0 when it does not.

For example, when building a UWP-specific provider, I generate a provider with an extra call to a SQLite Windows-specific function, but I don't actually build that provider for the uap10.0 TFM. Rather, I build it with netstandard2.0. If I did build it with uap10.0, the reference to SQLitePCLRaw.core would fail, since it builds for netstandard2.0.

When I made the big change to support netstandard2.0 as a minimum, I should have switched the UWP builds to use something like uap10.0.16299.

Nowadays, using a TFM like that doesn't seem to work. The more modern equivalent is net5.0-windows10.0.16299, but the net5.0-windows TFMs don't go all the way back to Fall Creators Update, so the earliest one I could support is net5.0-windows10.0.17763. I have no idea what breakage UWP users might see if I changed to that.

ericsink commented 2 years ago

Note also that I'm currently building things for netstandard2.0 and then dropping those assemblies into a nuget lib uap10.0 directory, which is kinda wrong.