Bug 53285 - Found conflicts between different versions of the same dependent assembly that could not be resolved.
Summary: Found conflicts between different versions of the same dependent assembly tha...
Alias: None
Product: Android
Classification: Xamarin
Component: General (show other bugs)
Version: 7.1 (C9)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
Depends on:
Reported: 2017-03-13 17:24 UTC by anton.duzenko@gmail.com
Modified: 2017-10-25 09:27 UTC (History)
3 users (show)

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

Build log (2.33 MB, text/plain)
2017-03-13 17:24 UTC, anton.duzenko@gmail.com
minimal reproducible for the System.Net.Http conflict (1.13 MB, application/x-zip-compressed)
2017-10-25 09:27 UTC, anton.duzenko@gmail.com

Description anton.duzenko@gmail.com 2017-03-13 17:24:54 UTC
Created attachment 20291 [details]
Build log

I can't repeat this in an new/empty app. It only happens in the business app I am supporting.

Warning		  These reference conflicts are listed in the build log when log verbosity is set to detailed.	SmartwebsCrossPlatform.Android	C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets	1820	

In the detailed build log I get a lot of project items using mscorlib but only one that uses mscorlib

2>      References which depend on "mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" [].
2>          D:\dev\smartwebs\xp\packages\Xamarin.Forms.\lib\MonoAndroid10\FormsViewGroup.dll
2>            Project file item includes which caused reference "D:\dev\smartwebs\xp\packages\Xamarin.Forms.\lib\MonoAndroid10\FormsViewGroup.dll".
2>              Xamarin.Forms.Core, Version=, Culture=neutral, processorArchitecture=MSIL
2>              Xamarin.Forms.Maps.Android, Version=, Culture=neutral, processorArchitecture=MSIL
2>              FormsViewGroup, Version=, Culture=neutral, processorArchitecture=MSIL
2>              Xamarin.Forms.Platform, Version=, Culture=neutral, processorArchitecture=MSIL
2>              D:\dev\smartwebs\xp\SmartwebsCrossPlatform.Portable\bin\Debug\SmartwebsCrossPlatform.Portable.dll
2>              Xamarin.Forms.Xaml, Version=, Culture=neutral, processorArchitecture=MSIL
2>              Xamarin.Forms.Maps, Version=, Culture=neutral, processorArchitecture=MSIL
2>              Xamarin.Forms.Platform.Android, Version=, Culture=neutral, processorArchitecture=MSIL
Comment 1 anton.duzenko@gmail.com 2017-03-13 17:26:27 UTC
I tried to create a new project but the error appears again when I add all source files.
I can't add sources by one because they rely on each other heavily.
Comment 2 Cody Beyer (MSFT) 2017-07-13 19:42:14 UTC

Is there any way you could provide a copy of the app? You can email to my address, or post here a as a private comment.
Comment 3 Jon Douglas [MSFT] 2017-10-13 18:09:39 UTC


The conflict seems to happen because Mono.Android.dll v1.0 has a reference to mscorlib

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll

Whereas the version comes from a PCL profile / netstandard:

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile7\mscorlib.dll

I'm not able to reproduce this currently. Can you provide a sample project?
Comment 4 anton.duzenko@gmail.com 2017-10-24 16:06:34 UTC
Possibly caused by https://github.com/JamesNK/Newtonsoft.Json/issues/1264
Comment 5 anton.duzenko@gmail.com 2017-10-25 09:24:46 UTC
Let's start with System.Net.Http conflicts. Repeatable with the attached project.
Comment 6 anton.duzenko@gmail.com 2017-10-25 09:27:16 UTC
Created attachment 25436 [details]
minimal reproducible for the System.Net.Http conflict

Note You need to log in before you can comment on or make changes to this bug.