簡體   English   中英

盡管已安裝軟件包,但無法找到 NuGet 軟件包 NU1101

[英]Unable to find NuGet packages despite packages being installed NU1101

我最近創建了我的第一個 C# 應用程序,並且由於購買了一台新計算機,我無法啟動該應用程序。 我收到以下 7 個錯誤Error NU1101 Unable to find package Microsoft.VisualStudio.Web.CodeGeneration.Design. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages clesson C:\Users\porkh\Desktop\WERK\Personal\c-lesson\clesson\clesson\clesson.csproj Error NU1101 Unable to find package Microsoft.VisualStudio.Web.CodeGeneration.Design. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages clesson C:\Users\porkh\Desktop\WERK\Personal\c-lesson\clesson\clesson\clesson.csproj每個都缺少不同的包。
由於這是缺少依賴項消息,我重新安裝了帶有 C# .net 支持的 Visual Studio 2019,但我遇到了同樣的錯誤。
在 StackOverFlow 上,我讀到我需要檢查我的 NuGet 包, 努吉特

在這里,它顯示了安裝時錯誤消息中“缺失”的每個 package。
我也嘗試過運行dotnet rundotnet restore但我收到相同的錯誤消息。 我對 C# 非常陌生,如果我錯過了其他答案中的解決方案,我很抱歉。 您可以給我的任何幫助我將不勝感激。
我的所有項目文件的鏈接在這里

在圖片中它說

此來源中不可用

並且 package 源設置為離線包。 我最好的猜測是,在右上角的下拉菜單中切換到官方 NuGet Feed 將解決您的問題。 您還想檢查 Nuget 源是否可用(應該)。 If not, click the Cog icon, and add it there with the name "Nuget" and the Url https://api.nuget.org/v3/index.json

暫無
暫無

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

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