title: Link Assemblys failed unexpectedly (Xamarin.ios.dll)
body: <p>When I try to compile in release mode I get the error, while in Debug works great. I am trying to archive an APK but I can't due to Xamarin.ios.dll error</p>
  
  <p>I tried deleting obj and bin folders and recompile them individually and it does work, but when I try to archive and an error appears asking me to check if I can compile the project.</p>
  
  <pre><code>Severity Code Description Project File Line Suppression State
  Error The "LinkAssemblies" task failed unexpectedly.
  Mono.Linker.MarkException: Error processing method: 'System.Void System.Net.Http.NSUrlSessionHandler/NSUrlSessionDataTaskStream/&lt;ReadAsync&gt;d__14::MoveNext()' in assembly: 'Xamarin.iOS.dll' ---&gt; System.ArgumentNullException: Value cannot be null.
  Parameter name: instruction at Mono.Cecil.Cil.InstructionOffset..ctor(Instruction instruction) at Mono.Cecil.Cil.CodeReader.ReadAsyncMethodBody(AsyncMethodBodyDebugInformation async_method) at Mono.Cecil.Cil.CodeReader.ReadCustomDebugInformations(MethodDefinition method) at Mono.Cecil.Cil.CodeReader.ReadDebugInfo() at Mono.Cecil.Cil.CodeReader.ReadMethodBody() at Mono.Cecil.Cil.CodeReader.ReadMethodBody(MethodDefinition method) at Mono.Cecil.MetadataReader.ReadMethodBody(MethodDefinition method) at Mono.Cecil.MethodDefinition.&lt;&gt;c.&lt;get_Body&gt;b__41_0(MethodDefinition method, MetadataReader reader) at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TRet&amp; variable, 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()
  --- End of inner exception stack trace ---
  at Mono.Linker.Steps.MarkStep.ProcessQueue()
  at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
  at Mono.Linker.Steps.MarkStep.Process()
  at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
  at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
  at Mono.Linker.Pipeline.Process(LinkContext context)
  at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext&amp; context) at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res) at Xamarin.Android.Tasks.LinkAssemblies.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.&lt;ExecuteInstantiatedTask&gt;d__26.MoveNext() MultiPlatFormXamarin.Android
  </code></pre>
  
  <p>Also, Xamarin.iOS is on the references of Xamarin.Android, is that correct?</p>