gpt4 book ai didi

c# - 无法加载 DLL 'sqlite3' : The specified module could not be found

转载 作者:行者123 更新时间:2023-11-30 13:57:53 25 4
gpt4 key购买 nike

让我的测试针对我的 SQLite 数据提供程序运行时,我遇到了很多麻烦。

我查看了建议的链接 here on stackoverflow ,但它们似乎都没有让我走上正确的道路。

我已经下载了 Windows Precompiled Binaries for sqlite3.dll

我已将 sqlite3.dll 复制到我的 Sqlite\bin 目录和我的 Tests\bin 目录中 dll copied into bin directories

不幸的是,当我运行测试时,出现以下错误

failed test

是否有一种明确的方法可以让它在我的 Windows 开发环境(目前的主要目标)以及在 Android 和 IOS 中运行(在不久的将来需要)?

此外,如果重要的话,这里是我的 Sqlite 项目引用。

enter image description here

最佳答案

所以对我来说答案很简单。我连接了一个预构建事件来检查机器的体系结构,并将适当的 dll 复制到输出 bin 目录中。

现在我们团队中的任何人都可以简单地运行 REBUILD,并且可以使用适当的 dll 针对 SQLite 运行。

if '$(PROCESSOR_ARCHITECTURE)'=='AMD64' (xcopy /y "$(ProjectDir)x64\sqlite3.dll" ".\") 
if '$(PROCESSOR_ARCHITECTURE)'=='x86' (xcopy /y "$(ProjectDir)x86\sqlite3.dll" ".\")
if '$(PROCESSOR_ARCHITEW6432)'=='AMD64' (xcopy /y "$(ProjectDir)x64\sqlite3.dll" ".\")

关于c# - 无法加载 DLL 'sqlite3' : The specified module could not be found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19412774/

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