我在 xamarin.Forms 中使用 SQLiteConnection 创建了一个项目。在 UWP 中,我实现了以下接口来返回 SQLiteConnection
public class SQLiteImplementation : ISQLite
{
public SQLiteConnection GetConnection()
{
var dbName = "db_sqlnet.db";
var path = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, dbName);
return new SQLiteConnection(path);
}
}
我在我的 UWP 项目中提到了 sqlite-net-pcl。但是在运行项目时出现以下错误,“System.IO.FileLoadException:定位的程序集的清单定义与程序集引用不匹配。(来自 HRESULT 的异常:0x80131040)在 Windows.UI.Xaml.Controls.Frame.Navigate Sample.UWP.App.OnLaunched(LaunchActivatedEventArgs e) 处的(类型 sourcePageType,Object 参数)“xamarin 表单 UWP 中的错误”
如何解决上述错误?我在我的代码中做错了还是因为引用了程序集?