Why is my Xamarin.Droid project referencing two different versions of System.Xml?

EasyGoingPatEasyGoingPat GBMember ✭✭✭

Hi,

I have just created a new PCL project. All seems fine, except for an Android build warning, which I have copied below.

as you can see, there is a version conflict referencing System.Xml. If I look in the References in Solution Explorer, the version there is 2.0.5.0 (which is the same as in the xamarin.iOS project, and so I assume is okay). So what is referencing V4.0.0.0?

Kind wishes ~ Patrick

1>  Serenocalm.Droid -> D:\Data\Work\Dev\Projects\Live\Serenocalm\Serenocalm.Droid\bin\Debug\Serenocalm.Droid.dll
1>  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.

Best Answers

Answers

  • cowbirdcowbird USMember

    @EasyGoingPat said:
    Hi,

    I have just created a new PCL project. All seems fine, except for an Android build warning, which I have copied below.

    as you can see, there is a version conflict referencing System.Xml. If I look in the References in Solution Explorer, the version there is 2.0.5.0 (which is the same as in the xamarin.iOS project, and so I assume is okay). So what is referencing V4.0.0.0?

    Kind wishes ~ Patrick

    1>  Serenocalm.Droid -> D:\Data\Work\Dev\Projects\Live\Serenocalm\Serenocalm.Droid\bin\Debug\Serenocalm.Droid.dll
    1>  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.
    

    Have you fixed this problem ?

  • EasyGoingPatEasyGoingPat GBMember ✭✭✭

    @cowbird No, not yet. Do you have any ideas?

  • cowbirdcowbird USMember

    Not yet . I have the same problem.

  • AOCT.08AOCT.08 USMember

    +1 same problem here. Haults deployment to Android when this message appears most of the time. Just hangs and never deploys to device. Have to do a weird combination of cleans and rebuilds before it will finally work.

  • EasyGoingPatEasyGoingPat GBMember ✭✭✭

    @AOCT.08 It is a long time ago now, but I think the solution was that something was not updated. Check that you have latest nuget packages and latest Xamarin. If using iOS, check that the Mac is also updated and is on the same update channel as the PC. I think that fixed it for me.

    • Patrick
  • JohnMillerJohnMiller USForum Administrator, Xamarin Team Xamurai

    Hey All,

    Would someone be able to upload a project that reproduces this message? Please also include your version information. If you would prefer, feel free to PM me on the forums.

  • JohnMillerJohnMiller USForum Administrator, Xamarin Team Xamurai
  • SheadogSheadog USMember

    Is there no workaround for these version conflicts? This is my first exposure to Xamarin as a .NET developer and I've spent HOURS installing and uninstalling Java, Xamarin, and Android SDKs (VS 2015 Pro/Win 10) trying to help someone with this product since they have a school project that relies on this. Right out of the gate this fails to deploy Droid on an unmodified solution. Please tell me there is an older version available somewhere that is functional?

Sign In or Register to comment.