saleem-mirza / serilog-sinks-sqlite

A Serilog sink that writes to SQLite
Apache License 2.0
56 stars 44 forks source link

Exception on macOS M3 @ Unable to load shared library 'SQLite.Interop.dll @ #47

Open rmarinho opened 7 months ago

rmarinho commented 7 months ago

I moved to a new Mac, and when I try to run my app I run into this issue with Seriilog split sink, I think is because it uses an old sqlite support.

    Message "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: \ndlopen(/Users/ruimarinho/Projects/scespinho/src/SCE.Web/bin/Debug/net8.0/runtimes/osx/native/SQLite.Interop.dll.dylib, 0x0001): tried: '/Users/ruimarinho/Projects/scespinho/src/SCE.Web/bin/Debug/net8.0/runtimes/osx/native/SQLite.Interop.dll.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/ruimarinho/Projects/scespinho/src/SCE.Web/bin/Debug/net8.0/runtimes/osx/native/SQLite.Interop.dll.dylib' (no such file), '/Users/ruimarinho/Projects/scespinho/src/SCE.Web/bin/Debug/net8.0/runtimes/osx/native/SQLite.Interop.dll.dylib' (no such file)\ndlopen(/Users/ruimarinho/Projects/scespinho/src/SCE.Web/bin/Debug/net8.0/runtimes/osx-arm64/native/SQLite.Interop.dll.dylib, 0x0001): tried: '/Users/ruimarinho/Projects/scespinho/src/SCE.Web/bin/Debug/net8.0/runtimes/osx-arm64/native/SQLite.Interop.dll…   string

   at System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none(SQLiteConfigOpsEnum op)
   at System.Data.SQLite.SQLite3.StaticIsInitialized()
   at System.Data.SQLite.SQLiteLog.PrivateInitialize(String className)
   at System.Data.SQLite.SQLiteLog.Initialize(String className)
   at System.Data.SQLite.SQLiteConnection..ctor(String connectionString, Boolean parseViaFramework)
   at System.Data.SQLite.SQLiteConnection..ctor(String connectionString)
   at Serilog.Sinks.SQLite.SQLiteSink.GetSqLiteConnection()
   at Serilog.Sinks.SQLite.SQLiteSink.InitializeDatabase()
   at Serilog.Sinks.SQLite.SQLiteSink..ctor(String sqlLiteDbPath, String tableName, IFormatProvider formatProvider, Boolean storeTimestampInUtc, Nullable`1 retentionPeriod, Nullable`1 retentionCheckInterval, UInt32 batchSize, UInt32 maxDatabaseSize, Boolean rollOver)
   at Serilog.LoggerConfigurationSQLiteExtensions.SQLite(LoggerSinkConfiguration loggerConfiguration, String sqliteDbPath, String tableName, LogEventLevel restrictedToMinimumLevel, IFormatProvider formatProvider, Boolean storeTimestampInUtc, Nullable`1 retentionPeriod, Nullable`1 retentionCheckInterval, LoggingLevelSwitch levelSwitch, UInt32 batchSize, UInt32 maxDatabaseSize, Boolean rollOver)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithManyArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)```