Windows 10 Slite 不工作
Windows 10 Slite Not working
我正在尝试将 sqlite 集成到我的 windows 10 cordova 应用程序中。创建了 windows 运行 时间组件并添加了
的引用
正在从 javascript.
调用 运行 时间组件方法
var db = new WinRuntime.Database();
在 运行 时间获得异常。
System.IO.FileNotFoundException: Could not load file or assembly
'SQLite.Net.Platform.WinRT, Version=3.1.0.0, Culture=neutral,
PublicKeyToken=null' or one of its dependencies. The system cannot
find the file specified.
试了最后一个星期,但没有答案。任何事情都会有帮助。
我做了一个基本的demo,重现了这个问题。看来项目找不到sqlite的程序集
目前的解决方法是手动添加 dll 文件。您需要添加以下两个dll文件:
- C:\Users\.nuget\packages\SQLite.Net-PCL\\lib\portable-win8+net45+wp8+wpa81+MonoAndroid1+MonoTouch1\SQLite.Net.dll
- C:\Users\.nuget\packages\SQLite.Net-PCL\\lib\Windows8\SQLite.Net.Platform.WinRT.dll
并且不要忘记卸载项目中的 SQLite.Net-PCL
包。
我正在尝试将 sqlite 集成到我的 windows 10 cordova 应用程序中。创建了 windows 运行 时间组件并添加了
的引用正在从 javascript.
调用 运行 时间组件方法
var db = new WinRuntime.Database();
在 运行 时间获得异常。
System.IO.FileNotFoundException: Could not load file or assembly 'SQLite.Net.Platform.WinRT, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
试了最后一个星期,但没有答案。任何事情都会有帮助。
我做了一个基本的demo,重现了这个问题。看来项目找不到sqlite的程序集
目前的解决方法是手动添加 dll 文件。您需要添加以下两个dll文件:
- C:\Users\.nuget\packages\SQLite.Net-PCL\\lib\portable-win8+net45+wp8+wpa81+MonoAndroid1+MonoTouch1\SQLite.Net.dll
- C:\Users\.nuget\packages\SQLite.Net-PCL\\lib\Windows8\SQLite.Net.Platform.WinRT.dll
并且不要忘记卸载项目中的 SQLite.Net-PCL
包。