[英]URL for NuGet packages in Visual Studio 2019
Been working on another computer for several months.在另一台电脑上工作了几个月。 Recently, I did a
git pull
on another laptop which is not used very often.最近,我在另一台不经常使用的笔记本电脑上做了一个
git pull
。 When I tried to build the solution, several projects failed due to missing NuGet packages.当我尝试构建解决方案时,由于缺少 NuGet 包,几个项目失败了。
I tried restoring the packages but this failed.我尝试恢复软件包,但失败了。 Packages
MSTest.TestFramework
and MSTest.TestAdapter
in particular were out-of-date, so I cleared the NuGet cache in Tools > Options > NuGet Package Manager > Clear All NuGet Cache(s)
. Packages
MSTest.TestFramework
and MSTest.TestAdapter
in particular were out-of-date, so I cleared the NuGet cache in Tools > Options > NuGet Package Manager > Clear All NuGet Cache(s)
.
But now when I right-click the project and Manage Nuget Packages...
, no packages are displayed at all!但是现在当我右键单击项目并
Manage Nuget Packages...
时,根本没有显示任何包!
Back in Tools > Options > NuGet Package Manager > Package Sources
only a single Machine-wide package source
is listed, namely Microsoft Visual Studio Offline Packages
. Back in
Tools > Options > NuGet Package Manager > Package Sources
only a single Machine-wide package source
is listed, namely Microsoft Visual Studio Offline Packages
. This points to a location on my location disk ("C:\Program Files (x86)\Microsoft SDKs\NuGetPackages", currently an empty folder).这指向我的位置磁盘上的一个位置(“C:\Program Files (x86)\Microsoft SDKs\NuGetPackages”,当前是一个空文件夹)。
New sources can be added, but what URL should be used to get the latest NuGet packages?可以添加新的源,但是应该使用什么 URL 来获取最新的 NuGet 包?
NuGet's documentation states that the endpoint is https://api.nuget.org/v3/index.json NuGet 的文档指出端点是https://api.nuget.org/v3/index.json
source: https://docs.microsoft.com/en-us/nuget/nuget-org/overview-nuget-org#api-endpoint-for-nugetorg来源: https://docs.microsoft.com/en-us/nuget/nuget-org/overview-nuget-org#api-endpoint-for-nugetorg
There's also a similar question in the FAQ: https://docs.microsoft.com/en-us/nuget/resources/nuget-faq#i-don-t-see-nuget-org-in-my-list-of-repositories--how-do-i-get-it-back- FAQ中也有类似的问题: https://docs.microsoft.com/en-us/nuget/resources/nuget-faq#i-don-t-see-nuget-org-in-my-list-of -repositories--how-do-i-get-it-back-
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.