SQLite.Net-PCL icon indicating copy to clipboard operation
SQLite.Net-PCL copied to clipboard

.NET Standard compatibility

Open econner20 opened this issue 9 years ago • 8 comments
trafficstars

With the recent release of .NET Standard and Microsoft saying ".NET Standard will replace Portable Class Libraries (PCLs) as the tooling story for building multi-platform .NET libraries." I am looking into what it will take to migrate my existing PCL that uses SQLite.Net-PCL to .NET Standard.

Is SQLite.Net-PCL compatible with .NET Standard?

econner20 avatar Nov 04 '16 14:11 econner20

If you follow the instructions at this link it works. I just did it.

https://xamarinhelp.com/dot-net-standard-pcl-xamarin-forms/

alanspires avatar Nov 04 '16 15:11 alanspires

Just to confirm, are you saying that you are using the SQLite.Net-PCL in a NET Standard Library? If so, which version of NET Standard did you target?

econner20 avatar Nov 04 '16 15:11 econner20

Yes confirmed. I converted my Xam.Forms.PCL project to .NET Standard 1.3 using the instructions in the link and have already restored all the packages. It's good to go.

alanspires avatar Nov 04 '16 15:11 alanspires

The above link is dead. Anyway you can post the instructions here? Are they easy?

OvestLabs avatar Dec 23 '16 06:12 OvestLabs

To get the link back to life: https://web.archive.org/web/20161019131653/https://xamarinhelp.com/dot-net-standard-pcl-xamarin-forms/

lgmorand avatar Jan 14 '17 11:01 lgmorand

I'm trying to use it in a .NET standard 1.5 library on my library+Android+iOS project but when I try to add "SQLite.Net.Core-PCL" (both 3.1.0 and 3.1.1) I get an incompatibility error:

Package SQLite.Net.Core-PCL 3.1.1 is not compatible with netstandard1.5 (.NETStandard,Version=v1.5). Package SQLite.Net.Core-PCL 3.1.1 supports: portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259)

At the moment I'm using an old version of sqlite-net and everything works, should I return to PCL 259? I've tried also .net standard 1.4, 1.3, 1.2 and 1.1, always the same error.

nonno avatar Mar 21 '17 07:03 nonno

Any solution to add the Package SQLite.Net.Core-PCL 3.1.1 without to upgrade the main project from PCL ?

flchaux avatar Oct 31 '17 15:10 flchaux

I find a solution here : https://www.cameronmoten.com/2017/08/19/fixing-xamarin-with-net-standard-in-visual-studio-2017-v-15-3/ You have to add <PackageTargetFallback>$(PackageTargetFallback);portable-win+net45+wp8+win81+wpa8</PackageTargetFallback> to your csproj next to the TargetFramework item.

flchaux avatar Nov 03 '17 08:11 flchaux