【发布时间】: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