我们在dotnet代码库中使用SQLite内存数据库来与ORMLite集成测试我们的存储库层。当我尝试在Mac上运行测试时,我得到这个错误:
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)
是否有一种方法可以在Mac上工作,这样我就不必每次需要运行测试时都恢复到我的Windows机器?
您可以尝试安装其他OrmLite中的一个吗?SQLite包,例如使用Microsoft.Data.Sqlite ADO。. NET提供程序使用:
<PackageReference Include="ServiceStack.OrmLite.Sqlite.Data" Version="6.*" />