Could not load file or assembly 'System.Data.SQLite.dll' or one of its dependencies. 找不到指定的模塊。
錯誤提示如下:
Could not load file or assembly 'System.Data.SQLite,Version=1.0.66.0,Culture=neutral,PublicKeyToken=db937bc2d44ff139' or one of its dependencies. 試圖加載格式不正確的程序
原因:
System.Data.SQLite分X64和X86版本。
一般來說,在64位系統上就應該使用X64版本的,但是這樣一來開發工作似乎就繁瑣了許多
如果不區分,就會出現如上的問題。
解決步驟1:[環境:VS2012]
為了簡便,一律使用X86版的SQLite開發,省了許多麻煩!然后……
依次選擇:【項目】-->【屬性】,【生成】里面的【目標平台】設置由【Any CPU】成【x86】
如圖:
System.Data.SQLite.dll is a mixed assembly, i.e. it contains both managed code and native code.,
需要安裝Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)