我在VB.net中有一个应用程序,我试图将它连接到SQLite。 我正在犯这个错误。
The thread 0x1cb4 has exited with code 259 (0x103).
'WindowsApplication1.vshost.exe' (CLR v4.0.30319: WindowsApplication1.vshost.exe): Loaded 'c:\users\eramo7176736\documents\visual studio 2013\Projects\WindowsApplication1\WindowsApplication1\bin\Debug\WindowsApplication1.exe'. Symbols loaded.
'WindowsApplication1.vshost.exe' (CLR v4.0.30319: WindowsApplication1.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Remoting\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Remoting.dll'. Cannot find or open the PDB file.
An unhandled exception of type 'System.IO.FileLoadException' occurred in System.Windows.Forms.dll
Additional information: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
这是我试图打开连接的代码
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim sqlconnect As New SQLite.SQLiteConnection()
Dim sqlcommand As SQLite.SQLiteCommand
sqlconnect.ConnectionString = "Data Source=C:\sqlite\test.db;"
sqlconnect.Open()
End Sub
End Class
Windows 7企业版,64位
我还添加了System.Data.SQLite.DLL
作为项目参考。