SQLite - Unable to load DLL 'SQLite.Interop.DLL'

2011.11.11 14:37 개발언어/SQL

DllNotFoundException이(가) 처리되지 않았습니다.
DLL 'SQLite.Interop.dll'을(를) 로드할 수 없습니다. 지정된 모듈을 찾을 수 없습니다. (예외가 발생한 HRESULT: 0x8007007E)

SQLite을 이용하여 Conncet을 하려는 데 오류가 발생하였다.






해결책

Robert Simpson saids The only time you'll ever see any reference to SQLite.Interop.DLL is if you downloaded the provider source code and compiled it yourself in Debug mode.

In Release mode, the SQLite.Interop.DLL doesn't exist. The interop dll and the managed wrapper are combined into a single assembly. It sounds to me like you've distributed the debug build of System.Data.SQLite which contains only the managed wrapper portion of the project. You can tell for sure by examining the size of the DLL. If System.Data.SQLite.DLL is around 120kb, then its a debug build.

You are always best off using my pre-compiled binary. The x86 and x64 builds are compiled using Profile Guided Optimizations and will always run faster than a regular release build.

디버깅모드에서는 SQLite.Interop.DLL을 첨부하고 참조하여야 한다는 것이다.
출력 디렉토리로 복사를 항상복사로 하여 dll을 내려주면 디버깅모드에서도 잘 동작한다.





참고사이트 : http://sqlite.phxsoftware.com/forums/p/1677/7136.aspx

신고
Tags