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.
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.
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?
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:\ELMAHon your local drive. When you added a reference to ELMAH, you probably pointed to one of the platform versions underC:\ELMAH\bin, likeC:\ELMAH\bin\net-2.0\Release. FromC:\ELMAH\binsub-directories, remove all other unwanted assemblies and files exceptElmah.dll,Elmah.pdbandElmah.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 toElmah.dllto your project in Visual Studio and none of the dependencies will get pulled into your application’sbindirectory. You may have to delete yourbindirectory and re-build your project to get rid of a stale copy ofSystem.Data.SQLite.dllfrom a previous reference. ELMAH will continue to work fine withoutSystem.Data.SQLite.dllas long as you do not useElmah.SQLiteErrorLogas your error log store.As per other suggestions, you should not have to remove references to SQLite from the ELMAH sources and make a private build.