加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Json.net与Windows Phone 8.1不兼容

发布时间:2020-12-16 18:39:51 所属栏目:百科 来源:网络整理
导读:试图通过nuget添加NewtonSofts json.net库.单击安装时获得“不兼容”对话框. 1 …在Visual Studio 2013 update 2中为Windows Phone 8.1项目创建新的“空白应用程序” 2 …单击管理NuGet包 3 …找到json.net版本6.0.3 4 …错误对话框说不兼容 Dialog还列出了
试图通过nuget添加NewtonSofts json.net库.单击安装时获得“不兼容”对话框.

1 …在Visual Studio 2013 update 2中为Windows Phone 8.1项目创建新的“空白应用程序”
2 …单击管理NuGet包
3 …找到json.net版本6.0.3
4 …错误对话框说不兼容

Dialog还列出了兼容版本,其中包括wp7,wp80和一些名为wpa81的版本.

我得到的错误如下:

Installing 'Newtonsoft.Json 6.0.3'.
Successfully installed 'Newtonsoft.Json 6.0.3'.
Adding 'Newtonsoft.Json 6.0.3' to App1.
Uninstalling 'Newtonsoft.Json 6.0.3'.
Successfully uninstalled 'Newtonsoft.Json 6.0.3'.
Install failed. Rolling back...
Could not install package 'Newtonsoft.Json 6.0.3'. You are trying to install this package into a project that targets 'WindowsPhoneApp,Version=v8.1',but the package does not contain any assembly references or content files that are compatible with that framework. For more information,contact the package author.

解决方法

我今天也遇到了这个问题.要修复它,这是一个愚蠢的,我在我的项目上取消选中WP8.1,安装了JSON.NET,然后进入并被动地重新检查它,但它有效!在两个单独的项目中,我可能会补充说.之后我构建,部署,测试了所有好东西而没有问题.我不知道为什么,但我很确定作为经验丰富的开发人员,我们都学会了永远不要质疑有用的东西.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读