簡體   English   中英

無法恢復 nuget package vs 2019

[英]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 版本時,會發生錯誤,從而阻止自動包還原及其依賴項。 因此,為了能夠恢復所需的包,請嘗試以下操作:

  1. 打開 Visual Studio 的開發人員命令提示符。
  2. Go 到您的解決方案目錄並運行dotnet restore

有時,使用NuGet Package Manager從 Visual Studio 刪除並重新安裝所需的 package 就足夠了。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM