Been working on another computer for several months. Recently, I did a git pull
on another laptop which is not used very often. When I tried to build the solution, several projects failed due to missing NuGet packages.
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)
.
But now when I right-click the project and Manage Nuget Packages...
, no packages are displayed at all!
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).
New sources can be added, but what URL should be used to get the latest NuGet packages?
NuGet's documentation states that the endpoint is https://api.nuget.org/v3/index.json
source: https://learn.microsoft.com/en-us/nuget/nuget-org/overview-nuget-org#api-endpoint-for-nugetorg
There's also a similar question in the FAQ: https://learn.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-