Using SQLite-Net Extensions and SQLiteConnection in Xamarin.Mac

牧云@^-^@ 提交于 2019-12-03 07:41:53

The problem was in project type I choose. I choose Empty project that targets the new Unified API. For that project SQLiteNetExtensions package doesn’t have required libraries, such as SQLite.Net.Platform.Generic.

To solve that problem you could either choose project that targets Classic API (for that project SQLiteNetExtensions contains SQLite.Net.Platform) or create Unified API project and after adding SQLiteNetExtensions package, manually add SQLite.Net.Platform dlls to references.

Although, I'm not sure why these .Platform libraries are included in SQLiteNetExtensions package for Classic API and not for Unified API

This is how it works in my project:

dbConnection = new SQLiteConnection(new SQLite.Net.Platform.Generic.SQLitePlatformGeneric(), databasePath);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!