简体   繁体   English

Xamarin可移植类库问题

[英]Xamarin portable class library issue

Hi I have the following issue, I am using xamarin on a Mac and created a cross-platform app solution using native single view app with portable class library. 嗨,我遇到以下问题,我在Mac上使用xamarin,并使用带有可移植类库的本机单视图应用程序创建了跨平台应用程序解决方案。

In the portable class library i added one reference to newtonsoft.json v4.0.3 but when i rebuild my project i get errors like the following: 在可移植类库中,我添加了对newtonsoft.json v4.0.3的引用,但是当我重建项目时,出现如下错误:

  • Reference to type 'System.ComponentModel.ITypedList' claims it is defined assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089', but it could not be found. 对类型'System.ComponentModel.ITypedList'的引用声称它已定义为程序集'System,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089',但找不到它。

What should i do? 我该怎么办?

Thank you very much in advance 提前非常感谢你

Version 4.0.3 of Newtonsoft.Json is only available for .NET (2.0, 3.5, 4.0), Windows Phone 7 (I think) and Silverlight 4. This version does not support portable class libraries . Newtonsoft.Json的 4.0.3版本仅适用于.NET( 2.0、3.5、4.0 ),Windows Phone 7(我认为)和Silverlight4。此版本不支持可移植类库

Use NuGet to download the latest Newtonsoft.Json version, it should provide a number of PCL alternatives, in particular a Profile 328 assembly that can target practically all modern platforms including Xamarin iOS and Android . 使用NuGet下载最新的Newtonsoft.Json版本,它应该提供许多PCL替代方案,尤其是Profile 328组件,该组件可以针对几乎所有现代平台,包括Xamarin iOSAndroid

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM