gpt4 book ai didi

sqlite - 在 SQLite.cs 中找不到类型或命名空间 'Sqlite'

转载 作者:IT王子 更新时间:2023-10-29 06:24:29 28 4
gpt4 key购买 nike

我有一个使用 SQLite 的 Windows Phone 8 应用程序。该应用程序具有许多数据库功能,并包含一个 sqlite 数据库文件,在运行该应用程序时,该文件将被复制到本地文件夹并进行访问。在我第一次切换到发布版本之前,所有这些都没有问题,但它没有工作。

我通过删除所有 NuGet 引用和 .dll 引用来“修复”此问题,并按照此处的步骤重新开始:A Workaround to Use SQLite in a Windows Phone 8 Application

我遇到了一个令人沮丧的问题,在从调试切换到发布构建(反之亦然)后,'Sqlite' 再次不再被识别。

我收到以下错误:

The type or namespace name 'Sqlite' could not be found (are you missing a using directive or an assembly reference?)

这些错误来自 SQLite.cs,特别是这些行:

using Sqlite3 = Sqlite.Sqlite3;
using Sqlite3DatabaseHandle = Sqlite.Database;
using Sqlite3Statement = Sqlite.Statement;

这怎么可能?我在这里看到了一些类似的问题,但他们都只是说删除并重新添加引用,问题莫名其妙地消失了。这对我不起作用。

最佳答案

关注这个article配置您的项目。还解释了here

Second you will need to go to the GITHUB website and download the code for SQLite-net-wp8. This is a c++ project you will need to access a sqlite database.

确保设置了条件编译符号:USE_WP8_NATIVE_SQLITE 并且版本是 x86 或 ARM。

在 VS Profesional 2013 上测试,发布版本(x86,ARM)

关于sqlite - 在 SQLite.cs 中找不到类型或命名空间 'Sqlite',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15299779/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com