We use SQLite in-memory databases in our dotnet codebase for integration testing our repository layer with ORMLite. When I try to run a test on Mac I get this error:
System.DllNotFoundException
Unable to load shared library 'SQLite.Interop.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libSQLite.Interop.dll, 0x0001): tried: 'libSQLite.Interop.dll' (no such file), '/usr/local/lib/libSQLite.Interop.dll' (no such file), '/usr/lib/libSQLite.Interop.dll' (no such file), '/Users/aaron/Projects/joinder/DASH/Test/ClientSiteData.Tests/bin/Debug/net6.0/libSQLite.Interop.dll' (no such file)
at System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none(SQLiteConfigOpsEnum op)
Is there a way to get this working on Mac so I don't have to revert to my Windows machine every time I need to run tests?
CodePudding user response:
Can you try installing one of the other OrmLite.SQLite packages, e.g. to use the Microsoft.Data.Sqlite ADO.NET Provider use:
<PackageReference Include="ServiceStack.OrmLite.Sqlite.Data" Version="6.*" />