Reputation: 127
I am trying to write app for UWP Xamarin.Forms with use of Azure Mobile SQLiteStore package.
I struggle with SQLitePCL package which is dependency of that mentioned above package.
In my UWP project I referenced extension SQLite for Universal Windows Platform also it's dependency Microsoft.VCLibs
Error is : Unable to load DLL 'sqlite3.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Android app works fine, only UWP has this problem crashing app as soon as it start to call SQLite.
And Stacktrace:
at SQLitePCL.SQLiteConnection.SetTemporaryDirectory()
at SQLitePCL.SQLiteConnection..ctor(String fileName, SQLiteOpen openFlag, Boolean setTemporaryDirectory)
at Microsoft.WindowsAzure.MobileServices.SQLiteStore.MobileServiceSQLiteStore..ctor(String fileName)
at WellDoneIt.Services.WellDoneItMobileService.d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at WellDoneIt.Services.WellDoneItMobileService.d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at WellDoneIt.ViewModel.ListViewModel.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at WellDoneIt.ViewModel.ListViewModel.<<-ctor>b__2_2>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_0(Object state)
at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore()
Anyone knows how to solve this issue?
Update: I have also double checked processor architecture and for emulator it is set to x86, and for real Win10 Mobile device it is set to ARM.
On both getting exactly the same issue. However when I run my app on local machine (my Windows 10 OS I develop on) everything works fine.
Thanks in advance.
Upvotes: 3
Views: 2599
Reputation: 2369
I have struggled for hours with what could be the same problem.
I upgraded the SQLite to the latest version and I think this is where the problem began.
I downloaded Visual Studio 2015 Update 2, ran and selected modify. Then ensured all the highlighted updates were ticked and the deprecated items are un-ticked. (Update 2 is included in the latest community download)
I hope this works for you.
Upvotes: 1
Reputation: 16199
You need to add a reference to SQLite for windows platforms.
On your UWP project go to Add References.
Go to Universal Windows > Extensions
Then make sure you tick SQLite for Universal App Platform
Upvotes: 5