Support .NetStandard

Issue #117 new
Diego Ponce de Leon created an issue

I can´t install this libray in a .netstandard project. Given that sqlite-net supports it from 1.3.0, using sqlitenetextensions means that version is mandatory. This is a big blocker for me (and I guess for others) at the moment because everybody is switching to .netstarndard now.

Are there any plans to upgrade?

Comments (12)

  1. Diego Ponce de Leon reporter

    Ok, after I learnt a bit more about .NetStandard I realized a pcl can be easily installed in a .netstandard library by replacing this:

    <PropertyGroup>
        <TargetFramework>netstandard1.4</TargetFramework>
      </PropertyGroup>
    

    with this:

    <PropertyGroup>
        <TargetFramework>netstandard1.4</TargetFramework>
        <PackageTargetFallback>$(PackageTargetFallback);portable-win+net45+wp8+win81+wpa8</PackageTargetFallback>
      </PropertyGroup>
    

    in the csproj file.

    With that said, the nuget I created is totally useless. However I won´t delete it in case anybody is using it.

  2. Anton Duzenko

    @Diego, do you get build warnings after that change? Like this:

    warning NU1701: Package 'SQLiteNetExtensions 2.0.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.

  3. André Silva de Jesus

    The project now seems to use .Net Standard. However, it's using .Net Standard 1.1. I don't know why that choice was made, since it perfectly compiles to .Net Standard 2.0.

    It would be nice if the package could be upgraded to .Net Standard 2.0.

  4. Iain Smith

    @andre_unidesk Its actually better to have this library use a lower version of .Net Standard so its more compatible with apps that use lower .Net Standard versions. No need to go to .NetStandard 2.0 if we don't need to use those APIs and Apps that use .NetStandard 2.0 are backwards compatible with 1.1.

  5. Asier Ba

    Thanks for that @b099l3

    I just upgraded my current project's reference for SQLiteNetExtensions to 2.1.0.

    When I build that project I don't get any warning, but when I build a test project referencing my project referencing the nuget package I get the following warnings:

    : warning NU1701: Package 'SQLitePCLRaw.lib.e_sqlite3.linux 1.1.5' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
    : warning NU1701: Package 'SQLitePCLRaw.lib.e_sqlite3.osx 1.1.5' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
    : warning NU1701: Package 'SQLitePCLRaw.lib.e_sqlite3.v110_xp 1.1.5' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
    

    Any idea why? Both projects are dotnet core with TargetFramework netcoreapp2.0.

  6. Iain Smith

    This warning is due to the dependancy we have on sqlite-net-pcl 1.4.118 which has a dependancy on SQLitePCLRaw.bundle_green 1.1.5 or greater and adds version 1.1.5 of
    SQLitePCLRaw.lib.e_sqlite3.linux,
    SQLitePCLRaw.lib.e_sqlite3.osx,
    SQLitePCLRaw.lib.e_sqlite3.v110_xp
    these were released on 5/1/2017. I would try to upgrade these first. From this Answer it looks like version 1.1.8 and above might not show this warning.

    There is a pre release version of sqlite-net-pcl 1.5.166-beta https://www.nuget.org/packages/sqlite-net-pcl/1.5.166-beta which has a dependancy on SQLitePCLRaw.bundle_green 1.1.8 and would stop this warning. So I could try to create a pre-release version of this package with that version as a depandancy but it cant be a release version due to nuget not allowing pre-release versions in release versions.

  7. Iain Smith

    There is also the possibility of setting the dependency on SQLitePCLRaw.bundle_green to >1.1.8 in SQLiteExtensions and this should get rid of the warning too. Let me have a look.

  8. Log in to comment