使用SQLite-WinRT包装器构建问题

前端之家收集整理的这篇文章主要介绍了使用SQLite-WinRT包装器构建问题前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
添加sqlite-WinRT数据库包装器后,我无法让我的应用程序为ARM目标构建.我可以用一个简单的测试应用程序重现这一点,如下所示:

(这是在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).

转到项目属性打开构建选项卡并将目标平台设置为ARM

编辑
添加了WinRt sqlite.它是在x86上建立的,当你想在ARM进程体系结构上构建它时,它无法构建你需要删除WinRTsqlite dll,而不是你的项目可以正常工作.这是Code

希望这可以帮助

猜你在找的Sqlite相关文章