Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build Problems with SQLite-WinRT Wrapper

I am having trouble getting my app to build for ARM target after adding the SQLite-WinRT database wrapper. I could reproduce this with a simple test app as follows:

(This is done in Visual Studio 2013.)

  1. Create an empty Windows 8.1 universal app (WinRT)
  2. Download SQLite for Windows Phone 8.1 and SQLite for Windows Runtime (Windows 8.1) using Tools/Extensions and Updates. Add them to the respective projects' references.
  3. Using NuGet, add SQLite-WinRT package to each project.
  4. Build for x86 (local machine or phone emulator) -> no problems.
  5. Build for ARM (phone device) -> build error shown below (independent of debug or release builds).

There was a mismatch between the processor architecture of the project being built "ARM" and the processor architecture, "x86", of the implementation file "C:\Users\jr\Documents\Visual Studio 2015\Projects\sqlite-test\packages\Sqlite-Winrt.3.8.7.1\lib\wpa81\SQLiteWinRT.dll" for "C:\Users\jr\Documents\Visual Studio 2015\Projects\sqlite-test\packages\Sqlite-Winrt.3.8.7.1\lib\wpa81\SQLiteWinRT.winmd". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and implementation file, or choose a winmd file with an implementation file that has a processor architecture which matches the targeted processor architecture of your project.

I posted a small test project here (Windows Phone 8.1 empty project, added SQLite, added SQLite-WinRT via NuGet).

like image 943
jerry Avatar asked Aug 21 '15 17:08

jerry


1 Answers

Go to project properties open build tab and set target platform to ARM enter image description here

Edit You have added WinRt sqlite. it is buid on x86 and when you want to build it on ARM process Architecture it cannot build you need to remove WinRTSQlite dll than your project will work fine. Here is Code

Hope this helps

like image 141
Muhammad Saifullah Avatar answered Nov 17 '22 13:11

Muhammad Saifullah