mejobloggs
mejobloggs

Reputation: 8166

Fetching Nuget update list takes very long time

In Visual Studio, if I right click a project and select "Manage NuGet Packages", it takes 1-2 minutes to bring up a list of updates.

My projects have around 30 nuget packages installed (I shouldnt think that's enough to justify 2 minutes of version checking)

If I go to the Installed tab, some of the packages show an up arrow, so it already knows which packages need updates... So why does the Updates tab take forever?

Additionally, if I close the Nuget screen and reopen... The updates tab will take another 2 minutes to load, even though 10 seconds ago it had fetched the list.

Things I have tried:

I am using VS 2019 16.11.1

I have tried VS 2022 Preview 3.1, but the nuget updates screen won't load even after waiting 5min (then I gave up and went back to 2019)

Is there a way I can speed up fetching the list of Nuget Updates?

Upvotes: 1

Views: 2673

Answers (2)

Alex
Alex

Reputation: 423

In my case, "Installed" and "Updates" took a long time to load. The problem was that some packages required additional info from Microsoft, which was blocked on proxy. Resolved with changing VS2022 proxy (devenv.exe) to another one.

Upvotes: 0

Tianyu
Tianyu

Reputation: 1070

Although the checking time will become longer if more NuGet packages have been installed, I believe this is a potential issue, and at least checking for a long time every time may not be a good experience.

I have reported this issue to Microsoft Developer Community, and here is the link.

I have checked the related options about setting NuGet and NuGet Package Manager but indeed there are fewer options to set. And I think re-check/reload the Updates list is by design and cannot be changed by simply changing a single option. But perhaps there are still something that we can do:

1). Tools > Options > NuGet Package Manager > Package Sources > Only choose and select the used Source, such as nuget.org and Microsoft Visual Studio Offline Packages.

2). Right-click project > Manage NuGet Packages… > on the top right corner, select nuget.org instead of All.(This should be based on the specific requirement)

Upvotes: 1

Related Questions