Girish
Girish

Reputation: 121

Visual Studio 2022 build takes forever

Visual Studio 2022 build takes forever and the same project works fine with Visual Studio 2019 on the same machine

On build, got NuGet package restore error:

NuGet package restore failed. Please see Error List window for detailed warnings and errors. Error occurred while restoring NuGet packages: The operation failed as details for project API.Tests could not be loaded.

Tried clearing packages cache, resetting settings, deleting .vs folder & also clearing %temp% prefetch

Upvotes: 11

Views: 3197

Answers (2)

user2214891
user2214891

Reputation: 9

Step 1: Navigate to Tools > NuGet Package Manager > Package Manager Settings

Step 1

Step 2: Enable the "Allow NuGet to download missing packages" checkbox, under the "Package Restore" header Step 2

Upvotes: 0

Bruno Guardia
Bruno Guardia

Reputation: 473

Fortunately, it is now fixed in the latest Visual Studio 17.5.0 Preview 6.0 https://visualstudio.microsoft.com/vs/preview/

There is an alternative in this answer, but while it helps when using command line, it is still very annoying for anything inside Visual Studio 2022. I am hitting it on many scenarios, like trying to run tests after build was successful.

VIsual Studio 2022 stuck on Restoring Nuget packages

Upvotes: 2

Related Questions