Bug 26211 - Unified API MTOUCHTASK reference form Xamarin.iOS error
Summary: Unified API MTOUCHTASK reference form Xamarin.iOS error
Status: RESOLVED ANSWERED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: master
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-01-20 15:52 UTC by Mirza
Modified: 2015-01-20 16:31 UTC (History)
2 users (show)

Tags:
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:
Status:
RESOLVED ANSWERED

Description Mirza 2015-01-20 15:52:31 UTC
Hi,

After installing the new Xamarin update for the Unified project for iOS, I get this error when instaling(building) my app to the device (it works on the simulator):

.../MTOUCHTASK: Error MT2002: Failed to resolve "System.Void UIKit.UITableView::set_DataSource(UIKit.UITableViewDataSource)" reference from "Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065" (MT2002) (...)

If I go to Options of the project and disable the Linker options, so I set it to: "Don't link" it works fine. I found this link: http://developer.xamarin.com/guides/ios/advanced_topics/linker/ where someone wrote to log a bug for that.
Comment 1 Sebastien Pouliot 2015-01-20 16:31:59 UTC
The error you have above is because one of your (binary) assembly is using an _older_preview_ (not the final version) of the unified API.

The linker tells you that a member is missing. Turning off linking does not solve that issue (it's still missing) and you risk to run into that issue at runtime (harder to diagnose).

You need to update your components (from the component store or elsewhere) to match the final API to ensure you won't find yourself with this problem (at runtime) and also to make sure your application size does not bemuse huge (without linking).