0

我使用Sqlite3並添加referene到我的Windows應用商店的應用程序,並試圖建立一個數據庫,如下圖所示:創建WinRT中使用SQLite表:BadImageFormatException

C:\Sqlite3>Sqlite3 mydata.db 

下一頁試圖從我隱藏作爲一個創建表圖:

Try 
    Dim dbpath = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "mydata.db") 
     Using db = New SQLite.SQLiteConnection(dbpath) 
     ' Create the tables if they don't exist 
     db.CreateTable(Of person)() 
     db.Commit() 
     db.Dispose() 
     db.Close() 
     End Using 
    Dim line = New MessageDialog("Table Created") 
    Await line.ShowAsync() 
    Catch 
End Try 

現在是這麼想的創建任何表,並得到是一個例外,如下圖所示

enter image description here

任何人都可以說我哪裏錯了?

回答

1

來源:http://goo.gl/mtJf70

SqlLite包含非託管代碼,除非你部署64位版本不能在64位 操作系統上運行它。快速修復: Project + Properties,Build選項卡,Platform Target = x86。

+1

@ Arjun-Awsome-感謝您的快速回答..那麼做了魔法:) – coder