oysteinkrog / SQLite.Net-PCL

Simple, powerful, cross-platform SQLite client and ORM - Updated version with PCL support
MIT License
353 stars 162 forks source link

.NET Standard compatibility #333

Open econner20 opened 8 years ago

econner20 commented 8 years ago

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?

alanspires commented 8 years ago

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

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

econner20 commented 8 years ago

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?

alanspires commented 8 years ago

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.

OvestLabs commented 7 years ago

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

lgmorand commented 7 years ago

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

nonno commented 7 years ago

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.

flchaux commented 7 years ago

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

flchaux commented 7 years ago

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.