将下载的.dll添加到我的项目时遇到问题 [英] Having trouble adding a downloaded .dll to my project

查看:89
本文介绍了将下载的.dll添加到我的项目时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从sqlite网站下载了sqlite3.dll。但是,当我尝试将其添加到我的项目时,我收到一个错误,"无法添加对'filepath'的引用。请确保该文件是可访问的,并且它是有效的程序集或COM组件。"

I have downloaded sqlite3.dll from the sqlite site. However when I try to add it to my project I get an error, "A reference to 'filepath' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component."

有关如何将此.dll添加到项目中的任何帮助吗?

Any help on how I can add this .dll to my project?

推荐答案

Sqlite.dll是一个C DLL,而不是COM组件或C#程序集。 为了使用该文件,您需要使用p / invoke,这很丑陋。

Sqlite.dll is a C DLL, not a COM component or a C# assembly.  In order to use that file, you would need to use p/invoke, which is ugly.

有几个第三方库为SQLite提供C#接口,例如System。 。Data.SQLite 这就是你需要的。

There are several third-party libraries that provide a C# interface to SQLite, such as System.Data.SQLite.  That's what you need.


这篇关于将下载的.dll添加到我的项目时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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