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
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.
Created attachment 8164 [details]
[XI 8.0] Linker "failed to resolve" UTType fields due to change from fields to properties
If a Xamarin.iOS library that uses one of the `UTType` fields (like `UTType.Movie` or `UTType.Image`) is compiled on Xamarin 188.8.131.52 and then used in a Xamarin.iOS 184.108.40.206 app project, it will cause the linker to fail (and vice versa).
The problem is that these types were change from fields to properties between 220.127.116.11 and 18.104.22.168. Since this breaks ABI backwards-compatibility for the linker, maybe the linker will need to be updated to handle this special case?
## Regression status: regression
Good: Xamarin.iOS 22.214.171.124, Hash: 77efa3f
Bad: Xamarin.iOS 126.96.36.199, Hash: 8bd8158
## Full error message
> error MT2002: Failed to resolve "MonoTouch.Foundation.NSString
> MonoTouch.MobileCoreServices.UTType::Movie" reference from "monotouch,
> Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065"
## Comparison of IL from XI 188.8.131.52 vs. XI 184.108.40.206
I used `ildasm` on the assemblies from each XI version, and found only one difference between the disassembled outputs:
### XI 220.127.116.11
> IL_0006: call class [monotouch]MonoTouch.Foundation.NSString [monotouch]MonoTouch.MobileCoreServices.UTType::get_Movie()
### XI 18.104.22.168
> IL_0006: ldsfld class [monotouch]MonoTouch.Foundation.NSString [monotouch]MonoTouch.MobileCoreServices.UTType::Movie
## Steps to reproduce
1. Open the attached test case.
2. Set the linker to link "SDK assemblies only."
3. Attempt to build the project with Xamarin.iOS 22.214.171.124. It will fail.
### Optional additional steps
4. Remove the existing "iOSLibrary" reference.
5. Add a reference to the "XI126.96.36.199/iOSLibrary.dll" version of the library.
6. Attempt to build the app project again. Now it will succeed.
## Additional version information
Mono 3.8.0 (no/db71bc1)
Xamarin Studio 5.4 (build 240)
Git revision: 01786bc67c7024ec33d327ed27e4416d7a846f4e
Xamarin addins: 7cd7dfcd6b7b7b53281508954ec080f1cd153ad3
GTK+ 2.24.23 (Raleigh theme)
Xcode 6.0.1 (6528), Build 6A317
Mac OS X 10.9.4
Created attachment 8165 [details]
Verbose build log
Bug 23073 is quite likely a duplicate of this bug. The initial description on that bug does not match the steps to reproduce from this bug, but I suspect that was due to some conflation of issues: the change to fully qualified names was also most likely accompanied by _rebuilding the library_ using Xamarin.iOS 8.0.
One of the three reports from the forums was definitely this bug (bug 23317):
I have checked this issue and I am able to reproduce this issue with the help of attached sample project and steps mentioned in bug description.
I observed that when I build the attached project with Xamarin.iOS library project which is compiled by Xamarin 188.8.131.52. I am getting following build error.
"Error MT2002: Failed to resolve "MonoTouch.Foundation.NSString MonoTouch.MobileCoreServices.UTType::Movie" reference from "monotouch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065" (MT2002) (iPhoneApp1)"
When I build the attached project using with Xamarin.iOS library project which is compiled by Xamarin.iOS 184.108.40.206 I am not getting any error. Project is build successfully.
Build output (using library project build with X.iOS: 220.127.116.11) : https://gist.github.com/saurabh360/15179af33c05c83ec41a
Build output (using library project build with X.iOS: 18.104.22.168) : https://gist.github.com/saurabh360/5f8e3a7354ab48f44653
=== Xamarin Studio ===
Version 5.5 (build 208)
Installation UUID: 6ea47b0d-1852-4aaf-808d-373ff0a5002b
Mono 3.10.0 ((detached/ac51002)
GTK+ 2.24.23 (Raleigh theme)
Package version: 310000016
=== Apple Developer Tools ===
Xcode 6.0.1 (6528)
=== Xamarin.iOS ===
Version: 22.214.171.124 (Business Edition)
Build date: 2014-09-23 18:49:01-0400
=== Xamarin.Android ===
Version: 4.18.0 (Business Edition)
Android SDK: /Users/jatin66/Desktop/Backup/android-sdk-macosx
Supported Android versions:
1.6 (API level 4)
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.0 (API level 11)
3.1 (API level 12)
3.2 (API level 13)
4.0 (API level 14)
4.0.3 (API level 15)
4.1 (API level 16)
4.2 (API level 17)
4.3 (API level 18)
4.4 (API level 19)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
=== Xamarin.Mac ===
Version: 126.96.36.199 (Business Edition)
=== Build Information ===
Release ID: 505000208
Git revision: 12aa66ae389a462ea0c7af228fa6a85c67bdd68e
Build date: 2014-09-24 02:28:20-04
Xamarin addins: f2b637530447a569d0a2006c808e9a649500fc68
=== Operating System ===
Mac OS X 10.9.5
Darwin Jatin66s-iMac.local 13.4.0 Darwin Kernel Version 13.4.0
Sun Aug 17 19:50:11 PDT 2014
Apologies guys, that was my change, and that was my mistake.
I do not think we have any good options here, with the software released, we will have people building binaries with the other set of references.
Binaries (.dll) that have references to the old (7.4) `UTType` will need to be rebuilt using XI 8.0 or later before being used (with XI 8.0+).
*** Bug 23073 has been marked as a duplicate of this bug. ***