Bug 11270 - Linker fails on 4.7.1
Summary: Linker fails on 4.7.1
Alias: None
Product: Android
Classification: Xamarin
Component: Pre-release ()
Version: 4.7.x
Hardware: PC Windows
: --- normal
Target Milestone: 5.1
Assignee: Alex Rønne Petersen
Depends on:
Reported: 2013-03-19 15:09 UTC by Redth
Modified: 2015-03-12 17:48 UTC (History)
5 users (show)

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

Build Output (135.45 KB, text/plain)
2013-03-19 15:10 UTC, Redth

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 Redth 2013-03-19 15:09:23 UTC
Linking is failing on 4.7.1 in release mode builds for me... 

Build output attached.
Comment 1 Redth 2013-03-19 15:10:04 UTC
Created attachment 3658 [details]
Build Output
Comment 2 Alex Rønne Petersen 2013-03-22 01:01:51 UTC
Can you provide a minimal test case, or alternatively, attach the solution which triggers the problem?

Comment 3 Atsushi Eno 2013-03-22 06:18:38 UTC
This is caused by cecil mdb reader at method System.Type Android.Support.V4.App.FragmentManagerInvoker::get_ThresholdType().

How to create a repro:

- Create a new Android application project.
- add reference to Mono.Android.Support.v4.dll.
- in MainActivity.cs, change the activity base class to Android.Support.V4.App.FragmentActivity.

This seems to be an issue with either the IL output, or if the IL is valid then cecil needs this fix: https://gist.github.com/atsushieno/d6267aeb19640cdfa99b
Comment 4 Atsushi Eno 2013-03-26 14:41:18 UTC
The fix is applied to cecil and mono now references the updated cecil. Though cecil master HEAD somehow breaks generator, it cannot be updated to the head, so the cecil fix is now in another branch (mono-3.0).

(This might be rather a workaround, not a fix, we don't know if the mdb is broken or not, but the issue is gone with this fix now.)
Comment 5 Saurabh 2014-11-26 03:46:33 UTC
I have checked this Issue with X.Android 5.0 and I have followed steps mentioned in Comment#3 I am successfully able to build the android application. This is the Build Output for the same: Build Output: https://gist.github.com/sunil360/d7b69ba40729555f359b

X.S 5.7(Build 596)
Git revision: d996e9ba6874a0d64241e43e5e6b06322ce29c84