且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

WP8 SQLite 错误:找不到指定的模块

更新时间:2023-02-01 08:25:24

  1. 从解决方案中删除对 sqlite 的所有引用
  2. http://visualstudiogallery.msdn.microsoft.com/cd120b42-安装 Sqlite for WP830f4-446e-8287-45387a4f40b7
  3. 重新启动 Visual Studio.就我而言,它是 Visual Studio 2013.
  4. 在您想使用 sqlite 的地方打开您的解决方案
  5. 使用包管理器控制台安装 sqlite-net.输入以下命令:Install-package sqlite-net
  6. 安装 sqlite-net-wp8.输入以下命令:Install-package sqlite-net-wp8
  7. 添加编译配置

  1. Delete all references to sqlite from solution
  2. Install Sqlite for WP8 from http://visualstudiogallery.msdn.microsoft.com/cd120b42-30f4-446e-8287-45387a4f40b7
  3. Restart Visual Studio. In my case it's Visual Studio 2013.
  4. open your solution where you want to use sqlite
  5. Using package manager console in order to install sqlite-net. Enter the following command: Install-package sqlite-net
  6. Install sqlite-net-wp8. Enter the following command: Install-package sqlite-net-wp8
  7. Add compilation cofiguration

7.1 右键单击​​项目并选择属性.

7.1 Right-click the project and select Properties.

7.2 选择构建"选项卡.

7.2 Select the Build tab.

7.3 在配置列表中,选择所有配置.

7.3 In the Configuration list, select All Configurations.

7.4 在平台列表中,选择所有平台.

7.4 In the Platform list, select All Platforms.

7.5 在 Build 选项卡上,您将在 General 标题下看到条件编译符号,其中包含 Windows Phone 应用项目中的默认值 SILVERLIGHT;WINDOWS_PHONE.将值更改为 SILVERLIGHT;WINDOWS_PHONE;USE_WP8_NATIVE_SQLITE 并保存项目文件.

7.5 On the Build tab, you’ll see Conditional compilation symbols under the General header, containing a default value of SILVERLIGHT;WINDOWS_PHONE on a Windows Phone app project. Change the value to SILVERLIGHT;WINDOWS_PHONE;USE_WP8_NATIVE_SQLITE and save the project file.

右键单击引用"并选择添加引用".转到Windows Phone"->扩展"并选中SQlite for Windows Phone"选项

Right-click References and select add reference.Go to Windows Phone -> Extensions and check the option SQlite for Windows Phone

它对我有用!!祝你好运

It works for me!! Good luck