You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
<ItemGroup>
<!-- Use bundle_sqlite3 instead with SpatiaLite on macOS and Linux --><!--<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.0" />-->
<PackageReferenceInclude="Microsoft.EntityFrameworkCore.Sqlite.Core"Version="3.1.0" />
<PackageReferenceInclude="SQLitePCLRaw.bundle_sqlite3"Version="2.0.4" />
<PackageReferenceInclude="Microsoft.EntityFrameworkCore.Sqlite.NetTopologySuite"Version="3.1.0" />
</ItemGroup>
I have replaced these with the current versions of the packages
<!-- Use bundle_sqlite3 instead with SpatiaLite on macOS and Linux -->
<PackageReferenceInclude="Microsoft.EntityFrameworkCore.Sqlite.Core"Version="5.0.11" />
<PackageReferenceInclude="SQLitePCLRaw.bundle_sqlite3"Version="2.0.7" />
<PackageReferenceInclude="Microsoft.EntityFrameworkCore.Sqlite.NetTopologySuite"Version="5.0.11"/>
And added the following line to my docker file:
RUN apt-get install -y sqlite3 libsqlite3-mod-spatialite
I get the following error
dotnet/efcore#28 93.52 Error Message:
dotnet/efcore#28 93.52 System.TypeInitializationException : The type initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception.
dotnet/efcore#28 93.52 ---- System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
dotnet/efcore#28 93.52 -------- System.DllNotFoundException : Unable to load shared library 'sqlite3' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libsqlite3: cannot open shared object file: No such file or directory
dotnet/efcore#28 93.52 Stack Trace:
dotnet/efcore#28 93.52 at Microsoft.Data.Sqlite.SqliteConnection..ctor(String connectionString)
dotnet/efcore#28 93.52 at BokaMera.Api.IntegrationTest.Tests.BokaMeraContext.SeedTests.CanSeedContextAsync() in /app/Tests/BokaMera.Api.IntegrationTest/Tests/BokaMeraContext/SeedTests.cs:line 29
dotnet/efcore#28 93.52 --- End of stack trace from previous location ---
dotnet/efcore#28 93.52 ----- Inner Stack Trace -----
dotnet/efcore#28 93.52 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
dotnet/efcore#28 93.52 at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
dotnet/efcore#28 93.52 at Microsoft.Data.Sqlite.Utilities.BundleInitializer.Initialize()
dotnet/efcore#28 93.52 at Microsoft.Data.Sqlite.SqliteConnection..cctor()
dotnet/efcore#28 93.52 ----- Inner Stack Trace -----
dotnet/efcore#28 93.52 at SQLitePCL.SQLite3Provider_sqlite3.NativeMethods.sqlite3_libversion_number()
dotnet/efcore#28 93.52 at SQLitePCL.SQLite3Provider_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number()
dotnet/efcore#28 93.52 at SQLitePCL.raw.SetProvider(ISQLite3Provider imp)
dotnet/efcore#28 93.52 at SQLitePCL.Batteries_V2.Init()
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.
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?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: