【问题标题】:Universal Windows App Using SQLite使用 SQLite 的通用 Windows 应用程序
【发布时间】:2015-08-10 13:46:33
【问题描述】:

我收到以下错误:

Message = 'SQLitePCL.raw' 的类型初始化器引发异常。 Message = 无法加载 DLL 'sqlite3':找不到指定的模块。 (HRESULT 异常:0x8007007E)

下面是我的代码:

int recCtr = 0;
var root = Windows.Storage.ApplicationData.Current.LocalFolder.Path;
var dbPath = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, dbName);
List<string> myCollection = new List<string>();
string tempDeckGroup = Global.currentDeckGroup.ToString() + Global.currentDeck.ToString();

using (var db = new SQLite.SQLiteConnection(dbPath))
{
    var list = db.Table<Decks>().Where(n => n.DeckGroup == tempDeckGroup).ToList();
    foreach (var item in list)
    {
        recCtr++;
        myCollection.Add(item._id.ToString() + "~" + item.WordName.ToString() + "~" + item.Definition.ToString());
    }
}

当我使用Microsoft Phone Emulator. 运行应用程序时发生错误,如果我部署到Local Machine or Simulator.code executes with no errors

我正在使用latest SQLite refernces (VSIX) and SQLite-net.pcl

我没有要测试的物理设备。 (Windows 10 Phone)

【问题讨论】:

    标签: c# sqlite win-universal-app


    【解决方案1】:

    这可能是重复的,但请先尝试herehere 的解决方案。

    【讨论】:

      猜你喜欢
      • 2023-03-18
      • 1970-01-01
      • 2016-04-17
      • 1970-01-01
      • 2018-09-23
      • 1970-01-01
      • 1970-01-01
      • 2018-04-14
      • 2012-09-01
      相关资源
      最近更新 更多