Open andrejohansson opened 3 years ago
/cc @bricelam
Have you installed the libsqlite3-dev
package?
sudo apt install libsqlite3-dev
@bricelam that seems to have done the trick, thank you!
Perhaps this should be included in the instructions in the documentation page with an example of how to include in your csproj?
I did it the following way and it seems to be working for me:
# Install spatiallite in order to use nettopologysuite in integrationtests
RUN apt-get install -y sqlite3 libsqlite3-dev libsqlite3-mod-spatialite
<ItemGroup Label="Windows only includes" Condition=" '$(OS)' == 'Windows_NT' ">
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.11" />
</ItemGroup>
<ItemGroup Label="Linux only includes" Condition=" '$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' ">
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="5.0.11" />
<PackageReference Include="SQLitePCLRaw.bundle_sqlite3" Version="2.0.7" />
</ItemGroup>
Consider including in docs.
File a bug
I think I've ran in to something similar as dotnet/efcore#16667 but for version 5.0.11 instead.
According to the instructions on the sqlite spatial package I should be using the following imports
I have replaced these with the current versions of the packages
And added the following line to my docker file:
I get the following error
Things work fine when running on Windows. Is there anything I'm missing with the instructions, or any workaround I can do to get up and running?
I tried setting LD_DEBUG=all when building the docker but it just truncates the output since there is way to much.
Include provider and version information
EF Core version: 5.0.11 Database provider: Microsoft.EntityFrameworkCore.Sqlite.Core Target framework: .NET 5.0 Operating system: Ubuntu docker image: mcr.microsoft.com/dotnet/sdk:5.0-buster-slim
I understand from reading around that @bricelam have a lot of insight in the matter, is there anything obvious you see? Or anything I can do to provide more information?