Robbit
Robbit

Reputation: 4358

Visual Studio can't update packages

Today, I create a new Xamarin.Forms project, in this project, I want to update the packages, see the picture:

enter image description here

But, I got this error:

Package restore failed. Rolling back package changes for 'App37.Android'.

Or you can refer to this picture:

enter image description here

You also can see many warnings, but I don't care about them. I am only focused on the error.

Upvotes: 0

Views: 622

Answers (2)

Jon Douglas
Jon Douglas

Reputation: 13176

The error is most likely because your project's <TargetFrameworkVersion> is not set to API 27 or higher which these packages require.

Upvotes: 1

magicandre1981
magicandre1981

Reputation: 28836

The message shows that App37.dll (is not found which is the shared project with the Views and Model to share it between iOS, Android and UWP) was not found.

I had a similar issue today (after updating yesterday to Visual Studio 2017 15.6 Update) and removed the reference to the shared project from UWP and Android project, selected the shared library project, did a right click and selected to build it and now I added the library back as reference to the UWP and Android project. Now I was able to compile code again.

Do this and now try to update the NuGet packages.

Upvotes: 1

Related Questions