我有一个使用VS 2013在Windows 8.1上构建的WinJS项目。
最近,我通过创建空的Javascript通用Windows 10项目并将旧项目中的所有文件添加到其中来将该项目升级为通用Windows 10。
我有Windows运行时组件和SQLite类库。
我添加了通用Windows运行时组件和通用类库,并将所有旧项目的文件复制到相应的位置。
我成功解决了所有构建错误。
我安装了所有必需的SQLite-net、Universal Windows Platform的SQLite、Newtonsoft等软件包。
但是当我运行应用程序并调用Windows运行时组件中的本地方法时,会出现某种奇怪的错误,如下所示:
An exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.ni.dll but was not handled in user code.
Additional information: Could not load file or assembly 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
Newtonsoft版本为: 9.0.1
我的Windows运行时组件的project.json文件如下:
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0",
"Newtonsoft.Json": "9.0.1"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {}
}
}
我的Visual Studio版本是:
我尝试删除所有的Newtonsoft json并重新安装,但没有成功。