Hi,
I'm trying to add a Xamarin.Mac project to my PCL Application. I'm trying to use sqlite-net-pcl but my project throws an SystemDLLNotFoundException
.
I'm using sqlite-net-pcl v.1.5.166-beta. I've installed the package both in my PCL and Xamarin.MacProject. I'm trying to build the app on Visual Studio for Mac.
I don't know what the cause could be.
Thanks for any help.
Stack Trace :
System.TypeInitializationException: The type initializer for 'SQLite.SQLiteConnection' threw an exception. ---> System.DllNotFoundException: e_sqlite3 at at (wrapper managed-to-native) SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods:sqlite3_libversion_number () at SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number () [0x00000] in <0bb15cfb0c30488ba94c83cf0500e031>:0 at SQLitePCL.raw.SetProvider (SQLitePCL.ISQLite3Provider imp) [0x00008] in <7314b275e2e94b2ca295a2cc04790fca>:0 at SQLitePCL.Batteries_V2.Init () [0x00005] in <b0910ecf1b2a42fea83ad5ae0f5aae10>:0 at SQLite.SQLiteConnection..cctor () [0x00010] in /Users/vagrant/git/src/SQLite.cs:212 --- End of inner exception stack trace --- at at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_generic_class_init (intptr) at xcom.app.pcl.Classes.DatabaseManager..ctor (System.String dbPath) [0x00021] in /Users/julien.torrent/Documents/XcomLocalApp/xcom.app.pcl/xcom.app.pcl/Classes/DatabaseManager.cs:18 at xcom.app.pcl.App.get_Database () [0x0000e] in /Users/julien.torrent/Documents/XcomLocalApp/xcom.app.pcl/xcom.app.pcl/App.xaml.cs:33 at xcom.app.pcl.ScreenPage.InitCbx () [0x00001] in /Users/julien.torrent/Documents/XcomLocalApp/xcom.app.pcl/xcom.app.pcl/ScreenPage.xaml.cs:213 at xcom.app.pcl.ScreenPage..ctor () [0x00016] in /Users/julien.torrent/Documents/XcomLocalApp/xcom.app.pcl/xcom.app.pcl/ScreenPage.xaml.cs:24 at xcom.app.pcl.tbdNavigation.InitializeComponent () [0x00012] in /Users/julien.torrent/Documents/XcomLocalApp/xcom.app.pcl/xcom.app.pcl/obj/Debug/xcom.app.pcl.tbdNavigation.xaml.g.cs:21 at xcom.app.pcl.tbdNavigation..ctor () [0x00013] in /Users/julien.torrent/Documents/XcomLocalApp/xcom.app.pcl/xcom.app.pcl/tbdNavigation.xaml.cs:21 at xcom.app.pcl.App..ctor () [0x00015] in /Users/julien.torrent/Documents/XcomLocalApp/xcom.app.pcl/xcom.app.pcl/App.xaml.cs:24 at xcom.app.pcl.MacOS.AppDelegate.DidFinishLaunching (Foundation.NSNotification notification) [0x00007] in /Users/julien.torrent/Documents/XcomLocalApp/xcom.app.pcl/xcom.app.pcl.MacOS/AppDelegate.cs:26 at at (wrapper managed-to-native) AppKit.NSApplication:NSApplicationMain (int,string[]) at AppKit.NSApplication.Main (System.String[] args) [0x00041] in /Users/builder/data/lanes/5143/124197ee/source/xamarin-macios/src/AppKit/NSApplication.cs:100 at xcom.app.pcl.MacOS.MainClass.Main (System.String[] args) [0x00017] in /Users/julien.torrent/Documents/XcomLocalApp/xcom.app.pcl/xcom.app.pcl.MacOS/Main.cs:11