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