Bug 7978 - The "LinkAssemblies" task failed unexpectedly.
Summary: The "LinkAssemblies" task failed unexpectedly.
Status: RESOLVED DUPLICATE of bug 7946
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: unspecified
Hardware: PC Windows
: --- critical
Target Milestone: ---
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2012-10-24 18:38 UTC by Tom Opgenorth
Modified: 2016-08-03 15:25 UTC (History)
4 users (show)

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


Attachments
Screen shot of error in VS2012 (42.38 KB, image/png)
2012-10-24 19:53 UTC, Tom Opgenorth
Details


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 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 DUPLICATE of bug 7946

Description Tom Opgenorth 2012-10-24 18:38:32 UTC
Upgrade to Mono for Android 4.2.8 from 4.2.7.  I am running VS2012 Ultimate on Windows Pro 8 64 bit.

When I build my project in Release mode, with "Linking: SDK assemblies" only, I get the following build error:

1>------ Rebuild All started: Project: RestSharp.MonoDroid, Configuration: Release Any CPU ------
1>  RestSharp.MonoDroid -> U:\tom\work\reportgraffiti.root\3rdparty\restsharp-RestSharp-054adce\RestSharp.MonoDroid\bin\Release\RestSharp.MonoDroid.dll
2>------ Rebuild All started: Project: ReportGraffiti, Configuration: Release Any CPU ------
2>U:\tom\work\reportgraffiti.root\Android\ReportGraffiti\SubmitPictureToWebsite.cs(26,50,26,63): warning CS0649: Field 'Net.Opgenorth.ReportGraffiti.SubmitPictureToWebsite._addToGallery' is never assigned to, and will always have its default value null
2>  ReportGraffiti -> U:\tom\work\reportgraffiti.root\Android\ReportGraffiti\bin\Release\ReportGraffiti.dll
2>C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(693,5): error MSB4018: The "LinkAssemblies" task failed unexpectedly.
2>C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(693,5): error MSB4018: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
2>C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(693,5): error MSB4018:    at Mono.Collections.Generic.Collection`1.get_Item(Int32 index)
2>C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(693,5): error MSB4018:    at Mono.Cecil.Mdb.MdbReader.ReadLocalVariables(MethodEntry entry, MethodBody body, Scope[] scopes)
2>C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(693,5): error MSB4018:    at Mono.Cecil.Mdb.MdbReader.Read(MethodBody body, InstructionMapper mapper)
2>C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(693,5): error MSB4018:    at Mono.Cecil.Cil.CodeReader.ReadMethodBody()
2>C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(693,5): error MSB4018:    at Mono.Cecil.Cil.CodeReader.ReadMethodBody(MethodDefinition method)
2>C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(693,5): error MSB4018:    at Mono.Cecil.MethodDefinition.<get_Body>b__2(MethodDefinition method, MetadataReader reader)
2>C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(693,5): error MSB4018:    at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)
2>C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(693,5): error MSB4018:    at Mono.Cecil.MethodDefinition.get_Body()
2>C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(693,5): error MSB4018:    at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
2>C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(693,5): error MSB4018:    at Mono.Linker.Steps.MarkStep.ProcessQueue()
2>C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(693,5): error MSB4018:    at Mono.Linker.Steps.MarkStep.Process()
2>C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(693,5): error MSB4018:    at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
2>C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(693,5): error MSB4018:    at Mono.Linker.Pipeline.Process(LinkContext context)
2>C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(693,5): error MSB4018:    at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context)
2>C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(693,5): error MSB4018:    at Xamarin.Android.Tasks.LinkAssemblies.Execute()
2>C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(693,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
2>C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(693,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

If I turn off all linking the the build proceeds as normal.
Comment 1 Tom Opgenorth 2012-10-24 19:53:47 UTC
Created attachment 2791 [details]
Screen shot of error in VS2012
Comment 2 Atsushi Eno 2012-10-25 00:01:48 UTC

*** This bug has been marked as a duplicate of bug 7946 ***