“无法在客户机上加载DLL”SQLite.Interop.dll“错误 [英] "Unable to load DLL 'SQLite.Interop.dll' error on client machine

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

问题描述

我已经创建了一个Winforms应用程序,并且正在使用SQLite与Entity Framework 6.我正在使用Visual Studio 2013。

I have created a Winforms application and am using SQLite with Entity Framework 6. I am using Visual Studio 2013.

该应用程序在我的本地机器上完美运行。但是,当程序在另一台机器上运行时,出现以下错误:

The application works perfectly on my local machine. However, when the program runs on another machine the following error occurs:

无法加载DLLSQLite.Interop.dll':找不到指定的模块。

"Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found.

就我而言,问题是当我发布我的项目时,Interop dll没有被复制到目录中。

As far as I'm concerned, the problem is that the Interop dll isn't being copied to the directory when I publish my project.

我的问题是:当我发布应用程序时,如何强制将此dll复制到正确的目录?

My question is: How do I force this dll to copy to the correct directory when I publish the application?

推荐答案

我发现我的问题的解决方法,我已经正确安装了所有的SQLite包,但是当我发布应用程序时,Interop.dll没有复制。

I found a workaround for my issue. I already had correctly installed all of the SQLite packages, yet the Interop.dlls were not copying over when I published the application.

我所做的是构建项目,然后进入bin / Debug /文件夹,并复制了包含SQLite.Interop.dll文件的x86和x64文件夹,然后将这些文件夹包含在我的项目中如果现在工作正常。

What I did was build the project, and then went into the bin/Debug/ folders and copied the x86 and x64 folders that contained the SQLite.Interop.dll files. I then included those folders in my project. All if working fine now.

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

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