user1261620
user1261620

Reputation: 377

Error since migrating to Unified version in Xamarin.IOS

I'm failing trying to migrate my Xamarin.IOS to use the new unified API using the automatic Xamarin Studio tools.

The solution is composed of 2 project. One PCL project and one Xamarin.IOS project that reference the PCL. When I try to build the project the following error appears:

.../FoodTruckiOS/MenuViewController.cs(10,10):
Error CS0012: The type `System.Object' is defined in an assembly that is not referenced. 
Consider adding a reference to assembly `System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' (CS0012) (FoodTruckiOS)

The line that throws the error in a ViewController has:

public MenuOption menuOption { get; set;}

MenuOption is a class a created in the PCL.

My version stack is:

=== Xamarin Studio ===

Version 5.7 (build 661) Installation UUID: 242e1f09-6bb4-4b18-9d6c-3f8ec2ebc716 Runtime: Mono 3.12.0 ((detached/a813491) GTK+ 2.24.23 (Raleigh theme)

Package version: 312000068

=== Apple Developer Tools ===

Xcode 6.1.1 (6611) Build 6A2008a

=== Xamarin.Mac ===

Not Installed

=== Xamarin.iOS ===

Version: 8.2.0.207 (Indie Edition) Hash: 3bf072d Branch: Build date: 2014-10-15 21:44:26-0400

=== Xamarin.Android ===

Not Installed

=== Build Information ===

Release ID: 507000661 Git revision: b70bab61da996da29045ea8ee8aed1a6faedbe78 Build date: 2015-01-05 16:31:31-05 Xamarin addins: 82f6c71490562d6cd125a09287f441902fdac3d7

=== Operating System ===

Mac OS X 10.10.1 Darwin Franciscos-Mini.lan 14.0.0 Darwin Kernel Version 14.0.0 Fri Sep 19 00:26:44 PDT 2014 root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64

Any idea what is causing the problem?

Upvotes: 1

Views: 321

Answers (1)

poupou
poupou

Reputation: 43553

That should not happen but the software versions you're using a not a common match.

IOW you should be using Xamarin.iOS 8.6, which has the final, supported version of the unified API. The version above (Version: 8.2.0.207) has a preview of the unified API (and most recent binaries/components won't be compatible with it).

The same applies to Xamarin Studio 5.7 update tool. It was made to work with XI 8.6 (not the older versions) and that might give you close, but not perfect, match when updating a project/solution.

Upvotes: 2

Related Questions