I am using Windows 10 with Visual Studio Community 2017 (v15.5.6). Right now I'm trying to update NuGet packages for Xamarin.Forms
from v2.3.4.231 to v2.5.
NuGet packages Xamarin.Forms updated successfully on Portable project and Xamarin.iOS project, but failed on Xamarin.Android. It keep rolling back to previous version and shows error message "The Collection is read-only".
Thanks in advance for those who can point out my mistakes. :) Many Thanks.
Okay, end-up I solve this with all this steps:
(1) First select a correct Target Framework
for your project. For me, I target Android Oreo. And will be good if your project is supports latest Android SDK. Go to Tools
-> Android
-> Android SDK Manager
to check and install latest SDK.
(2) Before updates Xamarin.Forms 2.5, make sure certain NuGet packages in Android has up-to-date. For my case is I need to make sure packages Xamarin.Android.Support.Design
has updated to version 25 or above.
(3) If you hit error message "The Collection is read-only". Go to Tools
-> NuGet Package Manager
-> Package Manager Settings
and click on button Clear All NuGet Cache(s)
. After this, close Visual Studio -> go to your project folder -> delete all your bin
and obj
file -> start Visual Studio again.
(4) Okay, now you can update NuGet packages Xamarin.Forms to version 2.5. After update, clean and build project.
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