xamarin.ios - MonoDroid 和 MonoTouch 中的可移植类库程序集引用问题

标签 xamarin.ios xamarin.android portable-class-library

我在我的项目中遇到了问题,我有 PCL for .Net 4.5、Windows Phone 8、WinRT、MonoTouch 和 MonoDroid,当我尝试构建引用该 PCL 错误的 MonoDroid 或 MonoTouch 项目时,如下所示:

*Error 1 The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

Error 2 The type 'System.Enum' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.



我已经做了 suggested命令(sn -Vr *,b03f5f7f11d50a3a),但它没有帮助。我正在使用以下配置文件:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile78

最佳答案

如果您将兼容性设置为从 .NET 4.5 到 .NET 4.0.3,它将起作用。

关于xamarin.ios - MonoDroid 和 MonoTouch 中的可移植类库程序集引用问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15153155/

相关文章:

c# - typeof(ICollection<>).GetTypeInfo().IsAssignableFrom(typeof(IList<>))

c# - 从 View 模型导航到mvvmcross中的另一个 View 模型时崩溃

azure - Monotouch - Windows Azure 工具包

xamarin.forms - 尝试将启动画面添加到 Xamarin 表单时出错-Xamarin Android

c# - Xamarin Android 渲染器中的长触手势

android - 单一Android : no sdk found at specified location in monoDevelop and visualStudio

ios - Monotouch 找不到 AudioFileOpenURL

c# - 输入显示和隐藏密码

c# - 我在可移植类库上使用 HttpClient 得到 403

c# - 可移植类库中的 Thread.Sleep()