Reputation: 188
After each update of MacOS or Visual Studio any project I open throws this error and can't restore packages. It happens in Visual Studio for Mac, the latest version.
Screenshot of the package console
Once I had a similar issue when a vpm connection was active, after disabling it Visual Studio had no issues with packages. But this time I don't have any VPN enabled.
Upvotes: 1
Views: 3951
Reputation: 188
For those who is interested, I found a solution to this issue.
dotnet nuget locals --clear all
Upvotes: 2
Reputation: 23
Microsoft suggests the following if restore is not working:
- Select the Tools > NuGet Package Manager > Package Manager Settings menu command.
- Set both options under Package Restore.
- Select OK.
- Build your project again.
https://learn.microsoft.com/en-us/nuget/consume-packages/package-restore-troubleshooting
Another suggestion:
Try deleting the project.assets.json file in the obj folder of your project and then right click on the solution and click Restore NuGet Packages again.
https://developercommunity.visualstudio.com/t/restore-nuget-packages-is-not-working/1367227
If those don't work here are other overflow suggestions: NuGet Package Restore Not Working
Hope this helps!
Upvotes: 1