Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix "No way to resolve conflict between "System.Xml" in xamarin android?

I am building an android app in Visual Studio 2015. It was working well. I am getting deployment error. When I am cleaning and rebuilding of the project is successful with no error. However when I try to run the app from Visual studio it tells me an deployment error occurred.

Error in Build Output:

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.

I have tried on real device too. It is showing deployment error on device and emulator as well..

Output: Output Window

like image 447
Priya Avatar asked Nov 09 '22 09:11

Priya


1 Answers

Try something like this.

  1. open your project in Visual Studio.
  2. Right click on your solution and select Manage NuGet Packages...
  3. Select Consolidate tab. This will set all your packages in same and right version.

Note 1 : Not sure if there's something similar to this in Xamarin Studio.


When I got this error, I removed all my packages, navigate to the project folder delete packages. Started adding all the packages manually from the beginning.

This resolved the error for me for a while.

like image 116
Yksh Avatar answered Nov 15 '22 06:11

Yksh