MissingMethodException C#Sqlite Compact框架
我正在开发一个应用程序,使用sqlite作为我的windows ce mobile上的数据库。当我尝试打开连接时,我得到一个异常作为MissingMethodException。 我已经添加了sqlite和interop dll,但我仍然收到了消息MissingMethodException C#Sqlite Compact框架,c#,.net,sqlite,windows-mobile,compact-framework,C#,.net,Sqlite,Windows Mobile,Compact Framework,我正在开发一个应用程序,使用sqlite作为我的windows ce mobile上的数据库。当我尝试打开连接时,我得到一个异常作为MissingMethodException。 我已经添加了sqlite和interop dll,但我仍然收到了消息 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using S
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SQLite;
namespace AGDeviceSample
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
try {
SQLiteConnection conn = new SQLiteConnection("Data Source=agm.sqlite;Version=3;");
conn.Open();
}catch(Exception e2){
MessageBox.Show(" " + e2.Message);
}
}
}
}
您可以使用
MessageBox.Show(e2.ToString())
以获取有关异常的详细信息。您的设备是否有Compact Framework 2.0或3.5?我的是DeviceApplicationTest1.Form1.button1\u Click()\r\n在System.Windows.Forms.Control.OnClick()\r\n在System.Windows.Forms.Button.OnClick()\r\n在System.Windows.Forms.ButtonBase.WnProc()\r\n在System.Windows.Forms.Control\r\n在Microsoft.AGL.Forms.EVL.EnterMainLoop()\r\n在System.Windows.Forms.Application.Run()\r\n在DeviceApplicationTest1.Program.Main()\r\n“该版本的SQLite似乎需要.NET CF 3.5。看,是的。这就是问题所在。。谢谢:)