I have started project in dotnet 5 and visual studio 2022 and now try to open it on visual studio 2019 in other pc. But I get error when I want to restore packages.
Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/system.xml.xmlserializer/index.json'.
The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/system.xml.xmlserializer/index.json' has timed out after 100000ms.
Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/system.net.nameresolution/index.json'.
The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/system.net.nameresolution/index.json' has timed out after 100000ms.
Failed to download package 'SkiaSharp.2.80.1' from 'https://api.nuget.org/v3-flatcontainer/skiasharp/2.80.1/skiasharp.2.80.1.nupkg'.
The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/skiasharp/2.80.1/skiasharp.2.80.1.nupkg' has timed out after 100000ms.
Failed to download package 'Aspose.Cells.22.8.0' from 'https://api.nuget.org/v3-flatcontainer/aspose.cells/22.8.0/aspose.cells.22.8.0.nupkg'.
Cannot access a disposed object.
Any idea please?
CodePudding user response:
In many cases when coping solution from one computer to another or especially if Visual Studio version is changed, errors occur that prevent automatic packages restoring and their dependencies. Therefore, to be able restore required packages try the following:
- Open developer command prompt for Visual Studio.
- Go to your solution directory and run
dotnet restore
.
Sometimes it's enough to remove and reinstall the required package from Visual Studio using the NuGet Package Manager.