Bug 13301 - Using Newtonsoft Json.NET does crash linker
Summary: Using Newtonsoft Json.NET does crash linker
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 4.7.x
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: Radek Doulik
Depends on:
Reported: 2013-07-17 13:28 UTC by Stefan Schoeb
Modified: 2017-06-27 15:39 UTC (History)
5 users (show)

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:

Description Stefan Schoeb 2013-07-17 13:28:05 UTC
Sample project can be found on github:

Build this project in "Release"-Mode and linker does stop with:
Error	4	The "LinkAssemblies" task failed unexpectedly.
Mono.Cecil.ResolutionException: Failed to resolve System.Dynamic.IDynamicMetaObjectProvider
   at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
   at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
   at Mono.Linker.Steps.MarkStep.MarkGenericArguments(IGenericInstance instance)
   at Mono.Linker.Steps.MarkStep.GetOriginalType(TypeReference type)
   at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
   at Mono.Linker.Steps.MarkStep.MarkField(FieldReference reference)
   at Mono.Linker.Steps.MarkStep.InitializeFields(TypeDefinition type)
   at Mono.Linker.Steps.MarkStep.InitializeType(TypeDefinition type)
   at Mono.Linker.Steps.MarkStep.InitializeType(TypeDefinition type)
   at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
   at Mono.Linker.Steps.MarkStep.Initialize()
   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()	RottenTomato.Droid

Using VS2012 and newest alpha (4.7.11) on Win8
Comment 1 Radek Doulik 2014-11-05 14:58:34 UTC
It works OK for me on Windows/XS with XA 4.18.1.

kzu, could you please test whether it works for you in VS? I suspect that it might have been fixed meanwhile.
Comment 3 Chris Hardy [MSFT] 2017-06-27 15:39:48 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!