11

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

Girish
  • 121
  • 4
  • 1
    Were you able to resolve this? I've just starting trying to use VS2022 and NuGet is completely nonfunctional. – brnlmrry Nov 24 '21 at 22:59
  • Hi there. Just checking if you managed to resolve the issue. Installed VS 2022 today and have the same issue. No dependencies are displaying – Arianule Jan 18 '22 at 18:07
  • I also have an issue with insane build times. It occurred just as i migrated a project from a packages config to PackageReference. Curious if you were trying something similar? – WyattBradley Jun 12 '22 at 15:39
  • 5 months old!!! Any updates?!?! – Jeff Blumenthal Jun 15 '22 at 23:16

1 Answers1

2

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

Bruno Guardia
  • 453
  • 4
  • 14