Found conflicts between different versions of the same dependent assembly warning

I have a Xamarin Forms cross platform application. During a build I get the following warning against the Android project:

Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. PerfectRoom.Droid C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets

I also noticed this in the build output after I turned up the build output to detailed:

2> There was a conflict between "Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" and "Xamarin.Forms.Core, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null".
2> "Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" was chosen because it was primary and "Xamarin.Forms.Core, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null" was not.

Does this line in the build output cause the warning that I am getting or could it be something else causing the warning? If this build output line is a possible cause how do I fix this when 2 projects reference the same named dll, but the dll versions are different? In my case my PCL project references a different version than the Android project

I'm building using VS2017 with the latest update and Xamarin 4.3.0.795

Tagged:

Answers

  • LucioMSPLucioMSP MXUniversity ✭✭✭

    Hi @ToddDaniels.5602 ,

    What version of Xamarin.Forms do you have on your PCL and Xamarin.Android?
    Tries to homologate both versions.

    Regards!

  • ToddDaniels.5602ToddDaniels.5602 USUniversity ✭✭

    The PCL and Android projects both have Xamarin.Forms version 2.3.3.193. In my initial question I just included one example of the conflicts, but here are the rest if it makes any difference. I recently updated The Xamarin.Forms package and some other packages. Before this update I never received this warning. What's puzzling is I have another code branch of this application that gives these same conflicts in the build output, but I do not get the warning. this is why I wasn't sure what's really causing the warning.

    2> There was a conflict between "HockeySDK, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" and "HockeySDK, Version=1.0.6288.33979, Culture=neutral, PublicKeyToken=null".
    2> "HockeySDK, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" was chosen because it was primary and "HockeySDK, Version=1.0.6288.33979, Culture=neutral, PublicKeyToken=null" was not.

    2> There was a conflict between "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" and "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".
    2> "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" was chosen because it was primary and "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" was not.

    2> There was a conflict between "Microsoft.CSharp, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
    2> "Microsoft.CSharp, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.

  • JoeHealyJoeHealy USUniversity ✭✭

    Having same problem. File/New/MasterDetails either forms or native yields root assembly conflicts.
    vs2017 > remote ios
    Works fine on mac.
    Same happens to me with xam101 tasky.

  • JoeHealyJoeHealy USUniversity ✭✭

    Upgraded Vs2017 to 15.1 ( 26403.3) ….
    Upgrade Mac to Xamarin Studio 6.3 (build 863)….

    Problem went away.

  • ToddDaniels.5602ToddDaniels.5602 USUniversity ✭✭

    Tried that, but I am still experiencing the same warning.

  • Hansi_ReitHansi_Reit ATMember ✭✭

    I solved the problem by downgrading my newtonsoft.json package to 8.0.3 or other packages that depend on microsoft.csharp

Sign In or Register to comment.