Reputation: 107
Installing any package fails with this error, updating packages also creates this error. Clearing the NuGet cache files causes this error to change to "access to the path mono.cecil.dll is denied" when trying to install "Xamarin.GooglePlayServices.Ads". Restarting visual studio causes the package restore error to come back.
Versions:
Visual Studio Information:
https://pastebin.com/vnuyZMWk Xamarin.Forms Project:
Xamarin.Android project:
Upvotes: 1
Views: 4065
Reputation: 1683
I faced the same error when I was trying to update the libraries one by one. Then I tried selecting all required libraries and clicked the Update button bellow the search box and it works. I have to tell that these libraries had dependencies between each other.
Here's an example:
Upvotes: 0
Reputation: 107
Visual Studio:
Update visual studio
https://pastebin.com/GkEeRqg3
Xamarin.Android project:
Cleaning house
Fixing NuGet
Update-Package -Reinstall
One way or another some of the NuGet packages used in Xamarin.Android used monoandroid81. Even though my solution was set to use 80 some NuGet packages installed were only compatible with 81.
This was shown in the NuGet Console.
Package Xamarin.Android.Support.v7.MediaRouter 27.0.2 is not compatible with monoandroid80 (MonoAndroid,Version=v8.0). Package Xamarin.Android.Support.v7.MediaRouter 27.0.2 supports:
monoandroid81 (MonoAndroid,Version=v8.1)
Upvotes: 3