Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve the conflict between 2 mscorlib versions in Visual Studio and Xamarin Studio?

For more than 2 days I have been trying to fix this error, but I have not succeeded.

This is the error :

No way to resolve conflict between "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" and "mscorlib". Choosing "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" arbitrarily.

I searched about it and so many people had this problem, but I couldn't find a solution for it.

Finally, how can we find a way to resolve the conflict between these 2 references?

like image 338
Lord Phantom Avatar asked Aug 11 '16 11:08

Lord Phantom


2 Answers

I don't have an answer but can provide the following:

  1. I have a blank Xamarin.Forms app targeted only to Android. I can build and deploy this one without any errors.
  2. I downloaded a Xamarin.Forms example from the Xamarin website and kept only the Android version. In this case I can rebuild the solution without any errors; however, when I try Start Without Debug, I get the exact error you report.

From these results I gather the following:

  1. The conflict between mscorlib versions is not related to the configuration of Visual Studio 17 but to the configuration of the app.
  2. The second of the links you included mentions installing a specific version of newtonsoft.json. Since this is a Nuget package, I thought that the problem would be with specific versions of these packages. Both of my apps use the same packages, but maybe the debug process doesn't necessarily use the same features of those packages.

I hope this helps.

like image 63
Gaurang Trivedi Avatar answered Nov 08 '22 03:11

Gaurang Trivedi


Issue I Faced: No way to resolve conflict between "mscorlib, Version=4.0.0.0, Culture=neutral,...............

Till now I have not succeeded in finding out the root cause, but I followed the steps to resolve the issue,

  1. Open Android device manager, and try starting the android simulator of interest.
  2. If it launches and states some error: stating to do a "Factory Reset", Stop the simulator and do the same.
  3. Try Starting the Simulator, it works.

Hope this works for you too!!!

like image 2
Bakkesh Shivakumar Aladahalli Avatar answered Nov 08 '22 04:11

Bakkesh Shivakumar Aladahalli