Bug 44408 - No way to resolve conflict between "System.Xml, Version=4.0.0.0, ..." and ""System.Xml, Version=2.0.5.0, ..."
Summary: No way to resolve conflict between "System.Xml, Version=4.0.0.0, ..." and ""S...
Status: RESOLVED NORESPONSE
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: unspecified
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2016-09-16 09:23 UTC by Svante
Modified: 2017-08-23 20:45 UTC (History)
4 users (show)

Tags:
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:
Status:
RESOLVED NORESPONSE

Description Svante 2016-09-16 09:23:41 UTC
This might not be in the right category. Please move as appropriate.

We get lots of warnings like the following (this is only a sample, and the list below of references is just one example of the general issue):

****

  There was a conflict between "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e".
  No way to resolve conflict between "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily.

***

This is likely not a problem in runtime, but it *is* a problem at build time, because this clutters the output window with a zillion lines of texts, and it is very likely that if a real problem occurs it won't be seen because it's hidden by this 'junk'.

A build shall be quiet and issue no warnings if there is nothing to warn about. That way any deviance is obvious and can be handled.

Although it's *probably* not a problem at run time, the warning is there because it *could* be, and *can* be - it's just too hard to know for sure. Therefore it's important to get rid of this.

Adding assembly binding redirects in app.config does not help with the compilation error.

***

Here's what happens (this is just a partial, in fact there are many more references and conflicts):

The project references:

"Xamarin.Forms.Core, Version=2.0.0.0" from "Xamarin.Forms.2.3.1.114\lib\MonoAndroid10\Xamarin.Forms.Core.dll"

which in turn references:

"System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

The same project also references:

"Xamarin.Android.Support.Design, Version=1.0.0.0" via "Xamarin.Android.Support.Design.23.3.0\lib\MonoAndroid43\Xamarin.Android.Support.Design.dll"

which in turn references Xamarin.Android.Support.v4, which in turn references:

"System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"

***

We now have a conflict that can't be resolved:

"System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
"System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"

are both referenced by from the projects point of view are third party assemblies (from the *same* third party, no less) that we have no control over and cannot change.

I can't see how the project can address this without Xamarin fixing it so there are builds of these assemblies with consistent references.
Comment 1 Patrick 2016-11-07 09:59:23 UTC
Me too. Exactly as above.

Does anyone have a fix for this?

It is a while since I worked on this Xamarin project for a while and I have just updated to Xamarin V4.2.0.719.  I am fairly sure these warnings were not there last time I worked on this project (about 2 months ago).
Comment 2 John Miller [MSFT] 2017-06-26 16:04:02 UTC
Thank you for taking the time to submit the bug. I was unable to reproduce this issue with the latest versions of Xamarin.Forms. Please attach a project using the latest versions to the bug that reproduces this issue. Thanks!
Comment 3 Cody Beyer (MSFT) 2017-08-23 20:45:25 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!