与地铁SQLite的 - 无法加载sqlite3.dll [英] SQLite with Metro - Unable to load sqlite3.dll
问题描述
我不能够创建使用SQLite与我的Metro应用的数据库
I am not able to create a database using SQLite with my Metro application.
说明
我继续接受。在失败的一个运行时异常加载SQLite3.dll
Description: I continue to receive a runtime exception on a failure to load SQLite3.dll.
观察:
我观察到数据库目录从未被创建该应用程序包的LocalState目录。
观察之后,我硬是在运行时执行文件路径的创建和下降的预期位置sqlite3.dll。
Observation: I observed that the database directory never gets created in the app package's LocalState directory. After observing this, I literally implemented file path creation at runtime and dropped the sqlite3.dll in the intended location.
不过,我仍然会收到一个异常加载失败SQLite3.dll。
Yet, I still receive an exception on failed to load SQLite3.dll.
- ,利用我的SQLite的CRUD代码编译罚款。
- 的SQLite依赖(packages.config,SQLite.cs和sqlite3.dll)位于一个单独的地铁类库,而不是应用程序的可执行项目。
- 的sqlite3.dll是基于ARM处理器。
- 的sqlite3.dll设置为内容,一直拷贝。
- My CRUD code that leverages SQLite compiles fine.
- SQLite dependencies (packages.config, SQLite.cs, and sqlite3.dll) are located in a separate metro class library instead of the application's executable project.
- The sqlite3.dll is based on the ARM processor.
- The sqlite3.dll is set to Content, Copy Always.
代码:
SQLiteAsyncConnection connection = new SQLiteAsyncConnection(DATABASE_DIRECTORY_NAME);
return await connection.CreateTableAsync<Service>();
请帮忙...
推荐答案
我得到了,我已经把sqlite3.dll项目$ b $我的根文件夹b中的sqlite3.dll设置为内容相同的error.After,一直拷贝。之后,它的工作。
I got the same error.After that I have placed sqlite3.dll in my root folder of the project the sqlite3.dll is set to Content, Copy Always. after that it's working
这篇关于与地铁SQLite的 - 无法加载sqlite3.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!