\bin中插入了不需要的SQLite [英] Unwanted SQLite inserted in \bin

查看:68
本文介绍了\bin中插入了不需要的SQLite的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2010,并使用Web部署将.Net MVC网站升级到特定环境。我安装了Elmah,并且在我的DEV环境上运行良好,但是当我按TEST进行测试时,由于SQLite格式不是很好而出现了异常。

I am using Visual Studio 2010 and using web deployment to promote the .Net MVC site to specific environments. I installed Elmah, and it worked great on my DEV environment, but when I pushed TEST, I got exceptions because SQLite was not a good format.

我没有使用SQLite在埃尔玛,否则我就知道了。我删除了对SQLite的所有可见引用,并且从所有配置bin目录中删除了.dll。但是它仍然会随每个构建一起插入。我意识到异常问题是无法为CPU Any构建SQLite,并且我的环境从x86到x64不等。但是我更希望SQLite不存在。

I am not using SQLite in Elmah or otherwise that I know of. I have removed all visible refernces to SQLite, and I have removed the .dll from all configuration bin directories. But it still gets inserted with each build. I realize the exception problem is that SQLite cannot be built for CPU Any, and my environments vary from x86 to x64. But I would prefer SQLite to not even be present.

自从卸载Elmah之后,SQLite仍插入\bin目录中。现在,我已经重新安装了Elmah,并在每次构建后从\bin中手动删除了SQLite.dll。每次构建后,如何确定导致SQLite插入我的intobin中的原因?

I have since uninstalled Elmah, and SQLite is still inserted into the \bin directory. I have now re-installed Elmah, and I manually delete the SQLite.dll from \bin after each build. How can I determine what is causing SQLite to be inserted into my \bin after each build?

推荐答案

如果不使用然后,您只需将SQLite从导入引用的 source 位置中删除即可。为了对此进行扩展,假设您已将ELMAH下载并解压缩到本地驱动器上的路径 C:\ELMAH 。当添加对ELMAH的引用时,您可能指向 C:\ELMAH\bin 下的平台版本之一,例如 C:\ \ELMAH\bin\net-2.0\Release 。从 C:\ELMAH\bin 子目录中,删除除 Elmah.dll 以外的所有其他不需要的程序集和文件。 , Elmah.pdb Elmah.xml 。严格来说,您甚至不需要后两者,但还是建议您使用它们。完成此操作后,可以在Visual Studio中的项目中添加对 Elmah.dll 的引用,并且所有依赖项都不会被拉入应用程序的 bin 目录。您可能必须删除 bin 目录,然后重新构建项目,以摆脱 System.Data.SQLite.dll 的陈旧副本 code>来自先前的参考。只要不使用 Elmah.SQLiteErrorLog ,在没有 System.Data.SQLite.dll 的情况下,ELMAH将继续正常工作。作为错误日志存储。

If you are not using SQLite then you need to simply remove it from the source location from where you imported the reference. To expand on that, let's assume you downloaded and unzipped ELMAH to the path C:\ELMAH on your local drive. When you added a reference to ELMAH, you probably pointed to one of the platform versions under C:\ELMAH\bin, like C:\ELMAH\bin\net-2.0\Release. From C:\ELMAH\bin sub-directories, remove all other unwanted assemblies and files except Elmah.dll, Elmah.pdb and Elmah.xml. Strictly speaking, you don't even need the latter two but they are nonetheless recommended. Once you've done that, you can add a reference to Elmah.dll to your project in Visual Studio and none of the dependencies will get pulled into your application's bin directory. You may have to delete your bin directory and re-build your project to get rid of a stale copy of System.Data.SQLite.dll from a previous reference. ELMAH will continue to work fine without System.Data.SQLite.dll as long as you do not use Elmah.SQLiteErrorLog as your error log store.

根据其他建议,您不必从ELMAH源中删除对SQLite的引用并进行私有构建。

As per other suggestions, you should not have to remove references to SQLite from the ELMAH sources and make a private build.

这篇关于\bin中插入了不需要的SQLite的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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