[英]Failed to restore nuget package vs 2019
I have started project in dotnet 5 and visual studio 2022 and now try to open it on visual studio 2019 in other pc.我已经在 dotnet 5 和 Visual Studio 2022 中启动了项目,现在尝试在其他电脑的 Visual Studio 2019 上打开它。 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?请问有什么想法吗?
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.在许多情况下,当将解决方案从一台计算机处理到另一台计算机时,尤其是在更改 Visual Studio 版本时,会发生错误,从而阻止自动包还原及其依赖项。 Therefore, to be able restore required packages try the following:因此,为了能够恢复所需的包,请尝试以下操作:
dotnet restore
. Go 到您的解决方案目录并运行dotnet restore
。Sometimes it's enough to remove and reinstall the required package from Visual Studio using the NuGet Package Manager .有时,使用NuGet Package Manager从 Visual Studio 删除并重新安装所需的 package 就足够了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.