Bug 15386 - Problem with PCL: The type `System.Object' is defined in an assembly that is not referenced.
Summary: Problem with PCL: The type `System.Object' is defined in an assembly that is ...
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 7.0.2.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Future Cycle (TBD)
Assignee: Martin Baulig
Depends on:
Reported: 2013-10-14 14:29 UTC by René Ruppert
Modified: 2016-01-11 22:13 UTC (History)
7 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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 Developer Community or GitHub 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.

Related Links:

Description René Ruppert 2013-10-14 14:29:12 UTC
This might be related to https://bugzilla.xamarin.com/show_bug.cgi?id=13400

I have a project that is targeting Console, Android and iOS. You can find it at 


If I rebuild all, I get the error:

Pyramid/Pyramid_CommonMostPlatforms/UDPNetworkService.cs(54,54): Error CS0012: The type `System.Object' is defined in an assembly that is not referenced. Consider adding a reference to assembly `System.Runtime, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' (CS0012) (NetworkServiceTest_Console)

The problem appeared when I added two new methods to the INetworkService interface. These methods use the NetworkGameInstance class.

The project setup is:

Xplat_Core: PCL for general cross platform development not related to the "Pyramid" game.

Pyramid_Core: PCL with all the core functionality of the "Pyramid" game.

Pyramid_CommonMostPlatforms: project that is not being built and holds classes/files that will be file-linked by most of the targeted platforms but contains code that is not available in a PCL.

NetworkServiceTest_Console: Console app that file-links UdpNetworkService.cs and runs it to test it. This is where the build error is occurring.

So Pyramid_Core holds INetworkService. Pyramid_CommonMostPlatforms implements UdpNetworkService : INetworkService. NetworkServiceTest_Console file-links UdpNetworkService and fails to build with the error above.

I am linking the UdpNetworkService.cs also in the iOS project. There it is building without problems.

=== Xamarin Studio ===

Version 4.1.12 (build 6)
Installation UUID: b8bdc5a1-348b-4fad-8e4f-4632ee990c59
	Mono 3.2.3 ((no/8d3b4b7)
	GTK+ 2.24.20 theme: Raleigh
	GTK# (
	Package version: 302030000

=== Apple Developer Tools ===

Xcode 5.0 (3332.25)
Build 5A1413

=== Xamarin.iOS ===

Version: (Indie Edition)
Hash: 57edee2
Build date: 2013-04-10 18:05:51-0400

=== Xamarin.Android ===

Version: 4.8.3 (Starter Edition)
Android SDK: /Users/rene/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)
		4.0.3 (API level 15)
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)

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Build Information ===

Release ID: 401120006
Git revision: a9ae69a4bf37955e4ab4df0cec7804f574c51f72
Build date: 2013-09-25 16:59:37+0000
Xamarin addins: 761ae26f220068dda0b62f0dd2253f617589a8c6

=== Operating System ===

Mac OS X 10.8.5
Darwin Renes-iMac.local 12.5.0 Darwin Kernel Version 12.5.0
    Sun Sep 29 13:33:47 PDT 2013
    root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64
Comment 1 Martin Baulig 2013-11-06 11:59:53 UTC
This has been fixed in the latest alpha version of our products.
Comment 2 PJ 2013-12-11 18:45:58 UTC
This fix is planned to be released with Xamarin.iOS 7.0.6, which should hit the beta channel before December 23rd.
Comment 3 Mohit Kheterpal 2013-12-13 09:03:19 UTC
Today we have checked this issue with following builds :

XS 4.2.2 (build 2)

When we 'Rebuild all' the attached sample then it does not give error mention in bug description.

Hence we are closing this issue.

Note : But when we 'Rebuild all' the attached sample then it gives error i.e. "Pyramid_Core.NetworkGameInstance' does not contain a definition for `ID'"

As per my observation Class "NetworkGameInstance" does not contain any datamember with name 'ID'.

Please suggest us if we have to check something else.
Comment 8 GouriKumari 2016-01-11 22:13:43 UTC
I couldn't reproduce this with XI master build. Please reopen it if the issue recurs.

## Build Log: https://gist.github.com/GouriKumari/0ee6f2822f430e89a986

## Test Env:
=== Xamarin Studio ===

Version 5.10.1 (build 6)
Installation UUID: 5ed3a124-4b77-4c6f-beb9-c830fd815e2a
	Mono 4.2.1 (explicit/6dd2d0d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010102

=== Xamarin.Profiler ===

Not Installed

=== Xamarin.Android ===

Version: (Starter Edition)
Android SDK: /Users/gourikumari/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.4   (API level 19)

SDK Tools Version: 22.6.3
SDK Platform Tools Version: 19.0.2
SDK Build Tools Version: 19.1

Java SDK: /usr
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

=== Xamarin Android Player ===

Not Installed

=== Apple Developer Tools ===

Xcode 7.2 (9548)
Build 7C68

=== Xamarin.Mac ===

Version: (Starter Edition)

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: 28b5d0d
Branch: master
Build date: 2016-01-11 07:30:34-0500

=== Build Information ===

Release ID: 510010006
Git revision: 0b60eecdb531933734519c13257d16a780274aab
Build date: 2015-12-04 20:28:20-05
Xamarin addins: 9876fd7c9837977178411ec7375b4352c0a0d6af
Build lane: monodevelop-lion-cycle6-baseline

=== Operating System ===

Mac OS X 10.10.5