Add SQLite.Net-PCL to .NET Standard 2.0 project

flchauxflchaux FRMember ✭✭

Hi Xamariners,

I want to add the SQLite.Net-PCL NuGet to my .NET Standard project and I have the following errors :

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

Is there a way to get this package work with a .NET Standard project without to downgrade to PCL ?

I used to work with Shared project and I'm migrating to .NET standard...

Florian.

Best Answers

Answers

  • AlexVilensAlexVilens USUniversity ✭✭

    Did you try to use sqlite-net-pcl by Frank A. Krueger instead?

  • flchauxflchaux FRMember ✭✭

    Thank you mattward. In deed I do not have the .NET Core 2.0 SDK installed. I will try.

  • @mattward said:
    If your project targets .NET Standard 2.0 then you should not need to add a target fallback if you have the .NET Core 2.0 SDK installed. If .NET Core 2.0 SDK is installed then a .NET Standard 2.0 sdk project will have an AssetTargetFallback of net461 which will allow PCL NuGet packages to be used. Also the PackageTargetFallback is deprecated and replaced with the AssetTargetFallback property in .NET Core 2.0. I would guess you are having this problem since you do not have the .NET Core 2.0 SDK installed.

    The PackageTargetFallback is required if you have .NET Core 1.0 SDK installed and are using a .NET Standard 1.x project.

    How can I add .Net Core 2.0? I tried from Solution -> shared project -> dependencies -> SDK folder but there is no option. Any help?

  • mattwardmattward GBMember Xamurai

    You can find older .NET Core SDKs from the .NET Core download archives and install it separately. Not sure if that helps with what you are trying to do.

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭✭

    @flchaux said:
    Hi Xamariners,

    I want to add the SQLite.Net-PCL NuGet to my .NET Standard project and I have the following errors :

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

    Is there a way to get this package work with a .NET Standard project without to downgrade to PCL ?

    I used to work with Shared project and I'm migrating to .NET standard...

    Florian.

    Is there any specific reason to use the package you mentioned above?

    I am not seeing as it works with .NET Standard on NuGet. See the screenshot below.

Sign In or Register to comment.