(这是在Visual Studio 2013中完成的.)
>创建一个空的Windows 8.1通用应用程序(WinRT)
>使用工具/扩展和更新下载适用于Windows Phone 8.1的sqlite和适用于Windows运行时的sqlite(Windows 8.1).将它们添加到相应项目的参考中.
>使用NuGet,将sqlite-WinRT包添加到每个项目.
>为x86(本地机器或手机模拟器)构建 – >没问题.
>针对ARM构建(电话设备) – >下面显示的构建错误(独立于调试或发布版本).
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.
我发布了一个小型测试项目here(Windows Phone 8.1空项目,添加了sqlite,通过NuGet添加了sqlite-WinRT).