我在OS X上的Xamarin Studio中使用了可移植类库(PCL)。我有两个PCL库,面向.NET 4.5,Windows Phone 8,Windows Store应用程序,Xamarin.iOS,和Xamarin.Android。我在iOS,Android和单元测试项目中引用这两个库。在3个领域我收到以下错误:便携式类库System.Object错误
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'.
的代码很简单:
MyClass myClass = new MyClass();
错误在每个引用该PCLS项目的一次发生。他们都不是同一班。我是PCL新手。我尝试删除Windows Phone 8(因为我最后一分钟添加了它),但问题没有消失。任何帮助将被解雇!
谢谢!
更新:
因此,这与发生在类(其中类是从PCL项目)宣布第一场。
int a = 0;
MyPCLClass _myPCLClass = new MyPCLClass(); //This is where the error appears
另一个奇数的方面是,有使用这些类超过50类,并且误差只出现在三个等级。
这是简介78,对吗? –
是的,它是个人资料78. – JamWils