Bug 23668 - System.Net.Http.Formatting should not contain Newtonsoft.Json
Summary: System.Net.Http.Formatting should not contain Newtonsoft.Json
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Net.Http.Formatting ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Ankit Jain
Depends on:
Reported: 2014-10-07 11:56 UTC by Alex Corrado [MSFT]
Modified: 2018-05-17 19:05 UTC (History)
8 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 for Bug 23668 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Alex Corrado [MSFT] 2014-10-07 11:56:56 UTC
System.Net.Http.Formatting contains a public copy of the Newtonsoft.Json namespaces and classes in the mono class library. The .NET System.Net.Http.Formatting does not contain those.

This can cause a myriad of problems. The one I observed was that a PCL built on .NET that references both System.Net.Http.Formatting and Newtonsoft.Json will fail to compile on mono because there are duplicate types.
Comment 1 Daniel Hughes 2015-05-18 01:05:57 UTC
I have just run into this problem on ubuntu 15.04. 

We have a project that references NewtonSoft.Json and System.Net.Http.Formatting. This cannot be compiled because there are two definitions of the types. The Platform on this bugs needs changing because I suspect it effects all mono platforms.
Comment 2 Mike Parker 2016-07-04 08:20:17 UTC
We have just run into this too.
Comment 3 Mihir Mone 2016-10-13 03:04:05 UTC
I've just run into this issue as well.

I am building one of my open source libraries via the Travis-CI public instance.

Library: https://github.com/monemihir/webextras
Travis-CI: https://travis-ci.org/monemihir/webextras

Mono Details:

$ mono --version
Mono JIT compiler version 4.6.1 (Stable Wed Oct 12 09:10:37 UTC 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	LLVM:          supported, not enabled.
	GC:            sgen

$ xbuild /version
XBuild Engine Version 14.0
Mono, Version
Copyright (C) 2005-2013 Various Mono authors
Comment 4 jaromir.flidr 2017-03-22 17:18:02 UTC
Also having issues with this, please remove.
Comment 5 Marek Safar 2018-03-15 10:30:14 UTC
We need to remove the API from binary-reference-assemblies. That should be easy and fix the majority of the issues.