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...
Status: NEEDINFO
Alias: None
Product: Android
Classification: Xamarin
Component: General (show other bugs)
Version: 7.1 (C9)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2017-03-13 17:24 UTC by anton.duzenko@gmail.com
Modified: 2017-10-13 18:09 UTC (History)
3 users (show)

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


Attachments
Build log (2.33 MB, text/plain)
2017-03-13 17:24 UTC, anton.duzenko@gmail.com
Details

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 2.0.5.0 but only one that uses mscorlib 4.0.0.0:

2>      References which depend on "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" [].
2>          D:\dev\smartwebs\xp\packages\Xamarin.Forms.2.3.3.193\lib\MonoAndroid10\FormsViewGroup.dll
2>            Project file item includes which caused reference "D:\dev\smartwebs\xp\packages\Xamarin.Forms.2.3.3.193\lib\MonoAndroid10\FormsViewGroup.dll".
2>              Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL
2>              Xamarin.Forms.Maps.Android, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL
2>              FormsViewGroup, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL
2>              Xamarin.Forms.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL
2>              D:\dev\smartwebs\xp\SmartwebsCrossPlatform.Portable\bin\Debug\SmartwebsCrossPlatform.Portable.dll
2>              Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL
2>              Xamarin.Forms.Maps, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL
2>              Xamarin.Forms.Platform.Android, Version=2.0.0.0, 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
Hey,

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
Related:

https://developercommunity.visualstudio.com/content/problem/121536/mscorlib-version-conflict-android.html

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

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

Whereas the 4.0.0.0 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?

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