Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
I originally posted this on stackoverflow.com
I am using Portable Class Libraries (PCL) in Xamarin Studio on OS X. I have two PCL libraries that are targeting .NET 4.5, Windows Phone 8, Windows Store Apps, Xamarin.iOS, and Xamarin.Android. I reference these two libraries in my iOS, Android, and Unit tests projects. In 3 areas I am getting the following error:
The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
The code is straightforward:
MyClass myClass = new MyClass();
The error occurs once in each of the projects that reference the PCLs. None of them are the same class. I am new to PCLs. I've tried removing the Windows Phone 8 (as I added it last minute) and yet the problem does not go away. Any help would be appeciated!
So this occurs with the first field declared in the class (where the class is from the PCL project).
int a = 0;
MyPCLClass _myPCLClass = new MyPCLClass(); //This is where the error appears
Another odd aspect is that there are over 50 classes using these classes, and the error is only appearing in three classes.
One person suggested I take the System.Runtime.dll from Windows (I took it from Windows 8) and add it to my Xamarin.iOS, Xamarin.Android, and NUnit test project. This did get rid of the error, but then another error appeared for System.Collections.Generic in those projects. It seems that the supported dlls aren't written out to these projects. I'm still ver new to PCLs so I don't would put that as a guess.
Please let me know if there is anymore information I can provide. Thanks!
What version of Xamarin Studio?
Version 4.0.10 (build 5)
Installation UUID: ccd48b1a-c136-419e-a619-b97cb64636e2
Mono 3.1.2 ((no/71af847)
Package version: 301020000
Apple Developer Tools
Xcode 4.6.3 (2068)
Xamarin.Mac: Not Installed
Version: 4.8.0 (Indie Edition)
Android SDK: /Users/james/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.1 (API level 12)
4.0 (API level 14)
Java SDK: /usr
java version "1.6.0_51"
Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509)
Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)
Version: 220.127.116.11 (Indie Edition)
Build date: 2013-17-07 15:48:27-0400
Release ID: 400100005
Git revision: f78b1117e201b3890dce45559bc8995adc4005a2
Build date: 2013-07-15 16:16:13+0000
Xamarin addins: a158bb2e0120450d0d23a35a5d4cbc695947bcab
Mac OS X 10.8.4
Darwin Jamess-MacBook-Pro.local 12.4.0 Darwin Kernel Version 12.4.0
Wed May 1 17:57:12 PDT 2013
I downloaded it from the beta channel on Saturday. Also, I forgot to attach the link to the original stackoverflow, but the above pretty much covers it.
I have just submitted https://bugzilla.xamarin.com/show_bug.cgi?id=15386 which looks very similar to your problem. Xamarin, please prioritize. We love PCLs!
This has been fixed in the latest alpha version of our products.