无法加载SQLite.Interop.dll [英] Unable to Load SQLite.Interop.dll

查看:64
本文介绍了无法加载SQLite.Interop.dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了c#应用程序,该应用程序已成功构建和发布(该应用程序正在使用本地SQLite数据库).

I created c# app which was successfully built and released (the application is using local SQLite database).

方案1(有效).我将Release文件夹复制到客户端计算机上,并且从该文件夹运行.exe文件时,该应用程序正常运行.只需提一下,我还复制了SQLite数据库文件和Release文件夹,并在配置文件中设置了db文件的新路径.

Scenario 1 (It works). I copied the Release folder to a client's machine and the application worked properly when I ran .exe file from the folder. Just to mention, I also copied SQLite database file along with Release folder and set up the new path to db file in config file.

场景2(这不起作用),当我发布该应用程序时,由于以下错误,无法完成安装过程,因此无法运行该应用程序:无法加载SQLite.Interop.dll".我还尝试像在场景1中一样在配置文件中设置db文件的新路径.在完成设置过程之后是否需要这样做?

Scenario 2 (This doesn't work) When I published the application I couldn't run it after the setup process was completed due to this error: "Unable to Load SQLite.Interop.dll". I also tried to set up the new path to db file in config file as I did in Scenario 1. Is this necessary after the setup process is finished?

我的Release文件夹有两个子文件夹-x64和x86,每个文件夹中都有SQLite.Interop.dll.但是我在应用程序"文件的发布"文件夹中看不到这些文件夹.我尝试将这些文件夹从发布"文件夹手动复制到发布"文件夹,但仍不能解决我的问题.

My Release folder has two subfolders - x64 and x86 with SQLite.Interop.dll in each of them. But I don't see these folders in my Publish folder in the Applications files. I tried to copy these folders from Release folder to Publish folder manually but it hasn't solved my problem.

有人可以解决此问题,并向我解释在调试程序时发生这种情况时如何强制Visual Studio将SQLite.Interop.dll复制到我的发布文件夹中吗(我猜这是问题的原因)?如果有人知道,请详细解释给我,因为我是第一次工作.

Can someone workaround this and explain me how I can force Visual Studio to copy SQLite.Interop.dll to my Publish folder as it happens when I debug the program (I guess this is the cause of my problem)? If someone knows please explain me that in details since I'm working this for the first time.

我用类似的问题检查了下一个主题,但是根据那里给出的说明我无法解决此问题(

I checked the next topic with the similar question but I couldn't fix this based on the instructions given there ("Unable to load DLL 'SQLite.Interop.dll' error on client machine).

推荐答案

感谢您的回答.它给了我一个解决方法.我将x86和x 64文件夹复制到输出文件夹,但是遇到了新问题-我的配置文件的计算哈希值与清单中指定的哈希值不同.

Thank you for answering. It gave me an idea how to workaround this. I copied x86 and x 64 folders to the output folder but then I bumped to the new issue - my config file had a different computed hash than specified in manifest.

我决定放弃发布,并决定使用另一种方法-创建设置文件( https://www.youtube.com/watch?v = z0v6hmumCFU ).创建设置并安装应用程序后,我将x86和x64文件夹手动复制到了应用程序文件夹(安装了应用程序的位置)中.最后一步是在应用程序的配置文件中设置SQLite数据库的新路径.

I decided to got away from publishing and decided for another option - to create setup file (https://www.youtube.com/watch?v=z0v6hmumCFU). Once the setup was created and application was installed, I manually copied x86 and x64 folders to the application folder (where the application was installed). The final step was to set up a new path to the SQLite database in config file of the application.

这篇关于无法加载SQLite.Interop.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆