I've just inherited an old Xamarin Forms application and I'm trying to upgrade all the packages. App was initially running fine, but since upgrading to the latest version of all packages, I'm now getting a crash calling Xamarin.Forms.Forms.Init(this, bundle);
:
Could not load type 'Xamarin.Forms.PreserveAttribute' from assembly 'Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'.
Here's my packages.config file contents:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ExifLib.PCL" version="1.0.1" targetFramework="MonoAndroid50" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="MonoAndroid50" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="MonoAndroid50" />
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="MonoAndroid50" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="MonoAndroid50" />
<package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="23.3.0" targetFramework="MonoAndroid50" />
<package id="Xamarin.Android.Support.Design" version="23.3.0" targetFramework="MonoAndroid50" />
<package id="Xamarin.Android.Support.v4" version="23.3.0" targetFramework="MonoAndroid50" />
<package id="Xamarin.Android.Support.v7.AppCompat" version="23.3.0" targetFramework="MonoAndroid50" />
<package id="Xamarin.Android.Support.v7.CardView" version="23.3.0" targetFramework="MonoAndroid50" />
<package id="Xamarin.Android.Support.v7.MediaRouter" version="23.3.0" targetFramework="MonoAndroid50" />
<package id="Xamarin.Android.Support.v7.RecyclerView" version="23.3.0" targetFramework="MonoAndroid50" />
<package id="Xamarin.Android.Support.Vector.Drawable" version="23.3.0" targetFramework="MonoAndroid50" />
<package id="Xamarin.Forms" version="2.3.0.38-pre2" targetFramework="MonoAndroid50" />
<package id="Xamarin.Forms.Labs" version="1.2.1-pre2" targetFramework="MonoAndroid44" />
<package id="Xamarin.Forms.Maps" version="2.2.0.31" targetFramework="MonoAndroid50" />
<package id="Xamarin.GooglePlayServices.Base" version="29.0.0.1" targetFramework="MonoAndroid50" />
<package id="Xamarin.GooglePlayServices.Basement" version="29.0.0.1" targetFramework="MonoAndroid50" />
<package id="Xamarin.GooglePlayServices.Maps" version="29.0.0.1" targetFramework="MonoAndroid50" />
<package id="Xamarin.Insights" version="1.12.3" targetFramework="MonoAndroid50" />
</packages>
I closed Xamarin Studio and cleared obj and bin folders and started Xamarin Studio again and everything worked fine
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With