I used Visual Studio 2015 with SP2. I try created Windows Universal app with sqlite. I added SQLite for Unversal Windows Platforms and SQLite.Net-PCl. It is my simple code
var conn = new SQLiteConnection(
new SQLitePlatformWinRT(),
Path.Combine(ApplicationData.Current.LocalFolder.Path, "Storage.sqlite"));
It is working for desktop. But it is not work for mobile(in device and emulator). I get this exception System.DllNotFoundException:
HResult=-2146233052
Message=Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Source=SQLite.Net.Platform.WinRT
TypeName=""
StackTrace:
at SQLite.Net.Platform.WinRT.SQLite3.SetDirectory(UInt32 directoryType, String directoryPath)
at SQLite.Net.Platform.WinRT.SQLiteApiWinRT..ctor()
at SQLite.Net.Platform.WinRT.SQLitePlatformWinRT..ctor()
at AppDbTest.MainPage.DbConnection()
at AppDbTest.MainPage..ctor()
at AppDbTest.AppDbTest_XamlTypeInfo.XamlTypeInfoProvider.Activate_0_MainPage()
at AppDbTest.AppDbTest_XamlTypeInfo.XamlUserType.ActivateInstance()
I try this method. I reinstall SQLite for Unversal Windows Platforms extension and SQLite.Net-PCl. I created clear project. But it not work for me. I spend three hour, please help me :).
Aucun commentaire:
Enregistrer un commentaire