2

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?

1 Answer 1

2

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.*" />
Sign up to request clarification or add additional context in comments.

3 Comments

Same result. Do I need to remove ServiceStack.OrmLite.Sqlite?
@devlord yes, you should only have 1 SQLite package installed, also delete the bin/ and obj/ folders before installing the new package to ensure a clean build
This doesn't work (changing to another OrmLite.Sqlite package, as suggested). Could be the issue mentioned here (stackoverflow.com/questions/70650711/…) regarding the Apple Silicon CPUs?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.