Bug 11495 - Release Build is crashing in Linking
Summary: Release Build is crashing in Linking
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 4.7.x
Hardware: PC Windows
: Highest normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-04-01 03:15 UTC by markus.miertschink
Modified: 2014-01-22 07:31 UTC (History)
5 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:
VERIFIED FIXED

Description markus.miertschink 2013-04-01 03:15:05 UTC
After installation of 4.7.2 Alpha, the Release build will fail.
It seems that something is wrong with the linking task. If you disable the linking it is working - but no way on creating an apk as far as I know.

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(5,5): Error MSB4018: The "LinkAssemblies" task failed unexpectedly.

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
   at Mono.Collections.Generic.Collection`1.get_Item(Int32 index)
   at Mono.Cecil.Mdb.MdbReader.ReadLocalVariables(MethodEntry entry, MethodBody body, Scope[] scopes)
   at Mono.Cecil.Mdb.MdbReader.Read(MethodBody body, InstructionMapper mapper)
   at Mono.Cecil.Cil.CodeReader.ReadMethodBody()
   at Mono.Cecil.Cil.CodeReader.ReadMethodBody(MethodDefinition method)
   at Mono.Cecil.MethodDefinition.<get_Body>b__2(MethodDefinition method, MetadataReader reader)
   at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)
   at Mono.Cecil.MethodDefinition.get_Body()
   at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
   at Mono.Linker.Steps.MarkStep.ProcessQueue()
   at Mono.Linker.Steps.MarkStep.Process()
   at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
   at Mono.Linker.Pipeline.Process(LinkContext context)
   at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context)
   at Xamarin.Android.Tasks.LinkAssemblies.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() (MSB4018)
Comment 1 Jonathan Pryor 2013-05-23 14:21:47 UTC
Please try again with 4.7.5.
Comment 2 Prashant manu 2014-01-22 07:31:37 UTC
I have checked this issue with following builds

All Windows
X.S 4.2.3(build 154)
Release ID: 402030154
4dca4a28d7ecc2c4df8a4d58e74b8902d0283b53
Build date: 2014-01-21 14:17:57Z
Xamarin addins: cc120a6f639fa6649aa4d23a0f0e7c5701134047

X.Android 4.13.0-39


I am successfully able to builds android application in release mode.