Bug 58762 - MonoTouch.Tuner.Linker.Process System.NullReferenceException Error
Summary: MonoTouch.Tuner.Linker.Process System.NullReferenceException Error
Status: RESOLVED DUPLICATE of bug 58813
Alias: None
Product: iOS
Classification: Xamarin
Component: General (show other bugs)
Version: XI 10.12 (d15-3)
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-08-15 00:28 UTC by roncyrier
Modified: 2017-08-18 17:51 UTC (History)
11 users (show)

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


Attachments
Screenshot of the "/Library/Frameworks" location in Finder on macOS (113.17 KB, image/png)
2017-08-17 19:54 UTC, Brendan Zagaeski (Xamarin Team, assistant)
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 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:
RESOLVED DUPLICATE of bug 58813

Description roncyrier 2017-08-15 00:28:59 UTC
I just installed the update to 4.6.0.297.  I'm running Visual Studio Community 2015.  When I try to build the Ad-Hoc update, I'm getting the following error. 

14>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(748,3): error : Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
14>  System.NullReferenceException: Object reference not set to an instance of an object
14>    at MonoTouch.Tuner.Linker.Process (MonoTouch.Tuner.LinkerOptions options, MonoTouch.Tuner.MonoTouchLinkContext& context, System.Collections.Generic.List`1[Mono.Cecil.AssemblyDefinition]& assemblies) [0x00145] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Tuning.cs:94 
14>    at Xamarin.Bundler.Target.LinkAssemblies (System.Collections.Generic.List`1[Mono.Cecil.AssemblyDefinition]& assemblies, System.String output_dir, System.Collections.Generic.IEnumerable`1[T] sharedCodeTargets) [0x0029a] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Target.cs:491 
14>    at Xamarin.Bundler.Target.ManagedLink () [0x005c5] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Target.cs:614 
14>    at Xamarin.Bundler.Target.ProcessAssemblies () [0x000bb] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Target.cs:800 
14>    at Xamarin.Bundler.Application.ProcessAssemblies () [0x0002f] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Application.cs:1396 
14>    at Xamarin.Bundler.Application.BuildManaged () [0x00001] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Application.cs:827 
14>    at Xamarin.Bundler.Application+<>c.<BuildAll>b__134_1 (Xamarin.Bundler.Application v) [0x00000] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Application.cs:775 
14>    at System.Collections.Generic.List`1[T].ForEach (System.Action`1[T] action) [0x00024] in <c9f8153c41de4f8cbafd0e32f9bf6b28>:0 
14>    at Xamarin.Bundler.Application.BuildAll () [0x00050] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Application.cs:775 
14>    at Xamarin.Bundler.Driver.Main2 (System.String[] args) [0x00481] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/mtouch.cs:1420 
14>    at Xamarin.Bundler.Driver.Main (System.String[] args) [0x0000f] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/mtouch.cs:945 


If I change the IOS Build --> Linker Behavior from Link Framework SDKs Only to Do No Link, it seems to build the ipa.   

The same problem happens in Release mode.   

Prior to this update, I was able to have Link Framework SDKs Only selected. 
(This is my first bug report. Sorry if this is in the wrong place.)
Comment 1 sebastian.klatte 2017-08-15 08:01:09 UTC
Can confirm this. In Visual Studio 2017.2.xxxxx.16 (PC) i made a copy of a configuration profile. this did not copy the value of the "link behavior". Therefore i had to switch to "Link Framework SDKs Only" and back to "Don't Link" to get the config saved and rid of the exception.
Comment 2 Omar 2017-08-15 12:30:18 UTC
Same issue here, I've just updated VisualStudio for mac to latest (V 7.1 Build 1297) and received this error on my Visual Studio 2017 15.2, then tried to update vs2017 to 15.3 and I got the same error after building in Release mode while the linker behavior is (Framework SDKs Only), changed to (Don't Link) and the build worked.
Comment 3 roncyrier 2017-08-15 14:24:09 UTC
I can also confirm that debug has the same behavior.  If it is (Framework SDKs Only), I get the error.  If it is (Don't Link).  One other thing to note, on mac, I'm running xamarin studio with latest updates.  XCode 8.3.3

It is nice that we have a work around, but isn't (Framework SDKs Only) the preferred option?
Comment 4 Alex Soto [MSFT] 2017-08-16 01:40:05 UTC
Thanks for the report.  There is a workaround download available in Bug 58789, Comment 4 that will give the intended error.

After you complete the steps in that comment to install the workaround `mtouch` version on your connected Mac, you should get a more useful linker error message that will better indicate how to resolve the issue.  As mentioned on Bug 58789, if you suspect that the more precise linker error indicates an issue that will need to be resolved the Xamarin.iOS source code (rather than by adjusting your project), please do reopen this bug with your new build logs (that include the new linker error message).  Thanks in advance!

*** This bug has been marked as a duplicate of bug 58789 ***
Comment 5 roncyrier 2017-08-16 17:06:55 UTC
Strange.  I do not see a frameworks folder in Library.
cp /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mtouch/mtouch.*

I'm running Xamarin Studio Community on the Mac.  Mac version Sierra 10.12.6
Comment 6 roncyrier 2017-08-16 17:25:00 UTC
Just for more clarification. I'm developing on a PC.  (windows 10)  Connected via network to a Macbook Air for build machine.  Mac has Sierra 10.12.6 and Xamarin Studio Community.
Comment 7 Elias Rincon 2017-08-16 17:46:33 UTC
I can confirm that same behavior happen on

VS 2017 Enterprise 15.3.0
Xamarin iOS 10.12.0.14

connected to MacOSX El Capitan with Xmarin iOS 10.12.0.8

Begin happen after updated Visual Studio on both OS
Comment 8 Alex Soto [MSFT] 2017-08-16 18:40:04 UTC
@Elias please go to bug 58789 for more information, see comment #4
Comment 9 Alex Soto [MSFT] 2017-08-16 18:41:45 UTC
@roncyrrier Please include (attach) all your version information from both mac and pc.

The easiest way to get exact version information:
- On Visual Studio for Mac: "Visual Studio" menu, "About Visual Studio" item, "Show Details" button.
- On Visual Studio for Windows: "Help menu", "About Microsoft Visual Studio" item.
Then copy/paste the version information (you can use the "Copy Information" button).
Comment 10 roncyrier 2017-08-16 20:12:58 UTC
Sorry for not including this earlier. 
Here is the Windows Visual Studio Information:
Microsoft Visual Studio Community 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.7.02046

Installed Version: Community

Visual Basic 2015   00322-20000-00000-AA240
Microsoft Visual Basic 2015

Visual C# 2015   00322-20000-00000-AA240
Microsoft Visual C# 2015

Visual C++ 2015   00322-20000-00000-AA240
Microsoft Visual C++ 2015

Windows Phone SDK 8.0 - ENU   00322-20000-00000-AA240
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   7.18.00214.2
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1   14.1.21111.0
ASP.NET and Web Tools 2015.1

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.8.1   14.0.11123.0
Azure App Service Tools v2.8.1

Common Azure Tools   1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

Merq   1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft .NET Core Tools (Preview 2)   14.1.21111.0
Microsoft .NET Core Tools (Preview 2)

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Mono Debugging for Visual Studio   4.6.8-pre (ec7034f)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   3.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.60519.0
Microsoft SQL Server Data Tools

Telerik ASP.NET AJAX VSExtensions   2017.2.629.0
Progress® Telerik® UI for ASP.NET AJAX Visual Studio extensions

TypeScript   1.8.36.0
TypeScript tools for Visual Studio

Visual Studio Tools for Apache Cordova   Update 10
Visual Studio Tools for Apache Cordova

Xamarin   4.6.0.297 (4a8abec)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.4.0.19 (0cd0214)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.12.0.14 (bf350ba)
Visual Studio extension to enable development for Xamarin.iOS.


Here is the Mac Xamarin Studio Information:
=== Xamarin Studio Community ===

Version 6.3 (build 864)
Installation UUID: b9f31de7-f308-4edb-a317-7fd643e7910e
Runtime:
	Mono 5.2.0.215 (d15-3/da80840) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 502000215

=== NuGet ===

Version: 3.5.0.0

=== Xamarin.Profiler ===

Version: 1.5.5
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 8.3.3 (12175.1)
Build 8E3004b

=== Xamarin.iOS ===

Version: 10.12.0.18 (Xamarin Studio Community)
Hash: 4a279c9a
Branch: d15-3
Build date: 2017-08-02 12:38:11-0400

=== Xamarin.Android ===

Version: 7.4.0.19 (Xamarin Studio Community)
Android SDK: /Users/roncyrier/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		6.0 (API level 23)

SDK Tools Version: 25.2.3
SDK Platform Tools Version: 25.0.1
SDK Build Tools Version: 25.0.1

Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin.Mac ===

Version: 3.6.0.17 (Xamarin Studio Community)

=== Xamarin Inspector ===

Version: 1.2.2
Hash: b71b035
Branch: d15-1
Build date: Fri, 21 Apr 2017 17:57:12 GMT

=== Build Information ===

Release ID: 603000864
Git revision: 6c2f6737278ccc3e81e12276d49c0d92f975f189
Build date: 2017-04-24 11:26:01-04
Xamarin addins: d8d46e577d8507c35260ce9d73df3c33415bb214
Build lane: monodevelop-lion-d15-1

=== Operating System ===

Mac OS X 10.12.6
Darwin Rons-Air 16.7.0 Darwin Kernel Version 16.7.0
    Thu Jun 15 17:36:27 PDT 2017
    root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
Comment 11 roncyrier 2017-08-17 15:27:22 UTC
Not sure if I needed to change the status back to reopen?  My info in comment 10.
Comment 12 Brendan Zagaeski (Xamarin Team, assistant) 2017-08-17 19:54:49 UTC
Created attachment 24282 [details]
Screenshot of the "/Library/Frameworks" location in Finder on macOS

> Strange.  I do not see a frameworks folder in Library
This is indeed quite strange.  I'm not 100% sure of Alex Soto's diagnostic idea for the version information.  But going back to the symptom of not seeing a Frameworks folder, I think macOS wouldn't behave properly if you really didn't really have that directory, so let me attach a screenshot of where that folder exists in Finder.

What does the corresponding location look like for you in Finder?
Comment 13 roncyrier 2017-08-17 20:06:15 UTC
Ah, geez.  My bad.  Thanks for the screenshot.  I was looking under my user folder when it is located on the root.   

Sorry, I'm new to the mac.   

Now, I'll try the info from bug 58789 comment 4 and report back what i find.
Comment 14 roncyrier 2017-08-18 02:42:39 UTC
Error		Error processing the method 'System.Void Xamarin.Auth.Account::.ctor(System.String,System.Collections.Generic.IDictionary`2<System.String,System.String>)' in the assembly 'Xamarin.Auth.dll': Value cannot be null.	AppMyApp.iOS		

Detail build log for ios project.

1>------ Build started: Project: AppMyApp.iOS, Configuration: Debug iPhone ------
1>  Connecting to Mac server 192.168.1.111...
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1167,3): warning : The launch image set "LaunchImages" has an unassigned child.
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1167,3): warning : The app icon set "AppIcons" has 6 unassigned children.
1>  No way to resolve conflict between "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily.
1>  Consider app.config remapping of assembly "System.Numerics, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "2.0.5.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Xamarin.iOS\v1.0\System.Numerics.dll] to Version "4.0.0.0" [C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll] to solve conflict and get rid of warning.
1>  Consider app.config remapping of assembly "System.IO, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "1.5.11.0" [] to Version "4.0.0.0" [C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IO\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.IO.dll] to solve conflict and get rid of warning.
1>  Consider app.config remapping of assembly "System.Globalization, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Globalization\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Globalization.dll] to Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Xamarin.iOS\v1.0\Facades\System.Globalization.dll] to solve conflict and get rid of warning.
1>  Consider app.config remapping of assembly "System.Diagnostics.Debug, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Diagnostics.Debug\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Diagnostics.Debug.dll] to Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Xamarin.iOS\v1.0\Facades\System.Diagnostics.Debug.dll] to solve conflict and get rid of warning.
1>  Consider app.config remapping of assembly "System.Reflection, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Reflection\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Reflection.dll] to Version "4.0.10.0" [] to solve conflict and get rid of warning.
1>  Consider app.config remapping of assembly "System.Runtime, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll] to Version "4.0.20.0" [] to solve conflict and get rid of warning.
1>  Consider app.config remapping of assembly "System.Net.Http, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "1.5.0.0" [E:\Data\NABSO\MyApp\AppMyApp\AppMyApp\bin\Debug\System.Net.Http.dll] to Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Xamarin.iOS\v1.0\System.Net.Http.dll] to solve conflict and get rid of warning.
1>  Consider app.config remapping of assembly "System.Threading.Tasks, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Threading.Tasks\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Threading.Tasks.dll] to Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Xamarin.iOS\v1.0\Facades\System.Threading.Tasks.dll] to solve conflict and get rid of warning.
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3276: Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190.
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1898,5): warning MSB3836: The explicit binding redirect on "System.Net.Http, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" conflicts with an autogenerated binding redirect. Consider removing it from the application configuration file or disabling autogenerated binding redirects. The build will replace it with: "<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" xmlns="urn:schemas-microsoft-com:asm.v1" />".
1>  AppMyApp.iOS -> E:\Data\NABSO\MyApp\AppMyApp\AppMyApp.iOS\bin\iPhone\Debug\AppMyAppiOS.exe
1>  Detected signing identity:
1>    Code Signing Key: "iPhone Developer: Ron Cyrier (FVXJY9GVMY)" (XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX)
1>    Provisioning Profile: "Ron's Profile For LS" (XXXXXXX-XXXX-XXXX-XXXX-XXXXXXX)
1>    Bundle Id: com.MyApp.app
1>    App Id: M26X68GB5F.com.MyApp.app
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(748,3): error : Error processing the method 'System.Void Xamarin.Auth.Account::.ctor(System.String,System.Collections.Generic.IDictionary`2<System.String,System.String>)' in the assembly 'Xamarin.Auth.dll': Value cannot be null.
1>  Parameter name: instruction
1>  --- inner exception
1>  Mono.Linker.MarkException: Error processing method: 'System.Void Xamarin.Auth.Account::.ctor(System.String,System.Collections.Generic.IDictionary`2<System.String,System.String>)' in assembly: 'Xamarin.Auth.dll' ---> System.ArgumentNullException: Value cannot be null.
1>  Parameter name: instruction
1>    at Mono.Cecil.Cil.InstructionOffset..ctor (Mono.Cecil.Cil.Instruction instruction) [0x00003] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadScope (Mono.Cecil.Cil.ScopeDebugInformation scope) [0x00015] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadScopes (Mono.Collections.Generic.Collection`1[T] scopes) [0x0000c] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadScope (Mono.Cecil.Cil.ScopeDebugInformation scope) [0x000af] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadScopes (Mono.Collections.Generic.Collection`1[T] scopes) [0x0000c] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadScope (Mono.Cecil.Cil.ScopeDebugInformation scope) [0x000af] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadDebugInfo () [0x0002a] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadMethodBody () [0x00091] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadMethodBody (Mono.Cecil.MethodDefinition method) [0x00014] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.MetadataReader.ReadMethodBody (Mono.Cecil.MethodDefinition method) [0x00000] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.MethodDefinition+<>c.<get_Body>b__41_0 (Mono.Cecil.MethodDefinition method, Mono.Cecil.MetadataReader reader) [0x00000] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.ModuleDefinition.Read[TItem,TRet] (TRet& variable, TItem item, System.Func`3[T1,T2,TResult] read) [0x00040] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.MethodDefinition.get_Body () [0x0002c] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x0019c] in /Users/poupou/git/xamarin/xamarin-macios/external/linker/linker/Mono.Linker.Steps/MarkStep.cs:1275 
1>    at Xamarin.Linker.Steps.CoreMarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00060] in /Users/poupou/git/xamarin/xamarin-macios/tools/linker/CoreMarkStep.cs:171 
1>    at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00023] in /Users/poupou/git/xamarin/xamarin-macios/external/linker/linker/Mono.Linker.Steps/MarkStep.cs:165 
1>     --- End of inner exception stack trace ---
1>    at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00030] in /Users/poupou/git/xamarin/xamarin-macios/external/linker/linker/Mono.Linker.Steps/MarkStep.cs:167 
1>    at Mono.Linker.Steps.MarkStep.Process () [0x00019] in /Users/poupou/git/xamarin/xamarin-macios/external/linker/linker/Mono.Linker.Steps/MarkStep.cs:122 
1>    at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x0000f] in /Users/poupou/git/xamarin/xamarin-macios/external/linker/linker/Mono.Linker.Steps/MarkStep.cs:67 
1>    at Xamarin.Linker.Steps.MobileMarkStep.Process (Mono.Linker.LinkContext context) [0x00001] in /Users/poupou/git/xamarin/xamarin-macios/tools/linker/MobileMarkStep.cs:36 
1>    at Xamarin.Linker.Steps.CoreMarkStep.Process (Mono.Linker.LinkContext context) [0x00017] in /Users/poupou/git/xamarin/xamarin-macios/tools/linker/CoreMarkStep.cs:26 
1>    at MonoTouch.Tuner.MonoTouchMarkStep.Process (Mono.Linker.LinkContext context) [0x0001d] in /Users/poupou/git/xamarin/xamarin-macios/tools/linker/MonoTouch.Tuner/MonoTouchMarkStep.cs:36 
1>    at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00023] in /Users/poupou/git/xamarin/xamarin-macios/external/linker/linker/Mono.Linker/Pipeline.cs:128 
1>    at MonoTouch.Tuner.Linker.Process (MonoTouch.Tuner.LinkerOptions options, MonoTouch.Tuner.MonoTouchLinkContext& context, System.Collections.Generic.List`1[Mono.Cecil.AssemblyDefinition]& assemblies) [0x000e0] in /Users/poupou/git/xamarin/xamarin-macios/tools/mtouch/Tuning.cs:82 
1>  ---
1>  --- inner exception
1>  System.ArgumentNullException: Value cannot be null.
1>  Parameter name: instruction
1>    at Mono.Cecil.Cil.InstructionOffset..ctor (Mono.Cecil.Cil.Instruction instruction) [0x00003] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadScope (Mono.Cecil.Cil.ScopeDebugInformation scope) [0x00015] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadScopes (Mono.Collections.Generic.Collection`1[T] scopes) [0x0000c] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadScope (Mono.Cecil.Cil.ScopeDebugInformation scope) [0x000af] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadScopes (Mono.Collections.Generic.Collection`1[T] scopes) [0x0000c] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadScope (Mono.Cecil.Cil.ScopeDebugInformation scope) [0x000af] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadDebugInfo () [0x0002a] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadMethodBody () [0x00091] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadMethodBody (Mono.Cecil.MethodDefinition method) [0x00014] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.MetadataReader.ReadMethodBody (Mono.Cecil.MethodDefinition method) [0x00000] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.MethodDefinition+<>c.<get_Body>b__41_0 (Mono.Cecil.MethodDefinition method, Mono.Cecil.MetadataReader reader) [0x00000] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.ModuleDefinition.Read[TItem,TRet] (TRet& variable, TItem item, System.Func`3[T1,T2,TResult] read) [0x00040] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.MethodDefinition.get_Body () [0x0002c] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x0019c] in /Users/poupou/git/xamarin/xamarin-macios/external/linker/linker/Mono.Linker.Steps/MarkStep.cs:1275 
1>    at Xamarin.Linker.Steps.CoreMarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00060] in /Users/poupou/git/xamarin/xamarin-macios/tools/linker/CoreMarkStep.cs:171 
1>    at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00023] in /Users/poupou/git/xamarin/xamarin-macios/external/linker/linker/Mono.Linker.Steps/MarkStep.cs:165 
1>  ---
1>    at MonoTouch.Tuner.Linker.Process (MonoTouch.Tuner.LinkerOptions options, MonoTouch.Tuner.MonoTouchLinkContext& context, System.Collections.Generic.List`1[Mono.Cecil.AssemblyDefinition]& assemblies) [0x00145] in /Users/poupou/git/xamarin/xamarin-macios/tools/mtouch/Tuning.cs:94 
1>    at Xamarin.Bundler.Target.LinkAssemblies (System.Collections.Generic.List`1[Mono.Cecil.AssemblyDefinition]& assemblies, System.String output_dir, System.Collections.Generic.IEnumerable`1[T] sharedCodeTargets) [0x0029a] in /Users/poupou/git/xamarin/xamarin-macios/tools/mtouch/Target.cs:491 
1>    at Xamarin.Bundler.Target.ManagedLink () [0x005c5] in /Users/poupou/git/xamarin/xamarin-macios/tools/mtouch/Target.cs:614 
1>    at Xamarin.Bundler.Target.ProcessAssemblies () [0x000bb] in /Users/poupou/git/xamarin/xamarin-macios/tools/mtouch/Target.cs:800 
1>    at Xamarin.Bundler.Application.ProcessAssemblies () [0x0002f] in /Users/poupou/git/xamarin/xamarin-macios/tools/mtouch/Application.cs:1396 
1>    at Xamarin.Bundler.Application.BuildManaged () [0x00001] in /Users/poupou/git/xamarin/xamarin-macios/tools/mtouch/Application.cs:827 
1>    at Xamarin.Bundler.Application+<>c.<BuildAll>b__134_1 (Xamarin.Bundler.Application v) [0x00000] in /Users/poupou/git/xamarin/xamarin-macios/tools/mtouch/Application.cs:775 
1>    at System.Collections.Generic.List`1[T].ForEach (System.Action`1[T] action) [0x00024] in <c9f8153c41de4f8cbafd0e32f9bf6b28>:0 
1>    at Xamarin.Bundler.Application.BuildAll () [0x00050] in /Users/poupou/git/xamarin/xamarin-macios/tools/mtouch/Application.cs:775 
1>    at Xamarin.Bundler.Driver.Main2 (System.String[] args) [0x00481] in /Users/poupou/git/xamarin/xamarin-macios/tools/mtouch/mtouch.cs:1420 
1>    at Xamarin.Bundler.Driver.Main (System.String[] args) [0x0000f] in /Users/poupou/git/xamarin/xamarin-macios/tools/mtouch/mtouch.cs:945 
========== Build: 0 succeeded, 1 failed, 3 up-to-date, 0 skipped ==========
Comment 15 Brendan Zagaeski (Xamarin Team, assistant) 2017-08-18 16:56:58 UTC
Thanks for the follow-up!  That matches Bug 58813, so I'll mark this as a duplicate for tallying purposes.

From that duplicate report, one possible temporary workaround if the library usage scenario in your application will allow for it is to downgrade the Xamarin.Auth NuGet package to version 1.3.2.7.

*** This bug has been marked as a duplicate of bug 58813 ***
Comment 16 roncyrier 2017-08-18 17:51:50 UTC
The suggested fix to downgrade to xamarin.auth 1.3.2.7 worked for me.  
Will follow 58813 to see how the progress goes to get latest of xamarin.auth to play nice. 

Thanks!