2

Today I have installed VS Community 2022. I created defualt ASP.NET Core Web App from VS template, but when I try to start this application this is what I get:

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 WebApplication2 could not be loaded.

Error List window is empty, also I have a yellow triangle on my dependencies, and Paths to Microsoft.AspNetCore.App and Microsoft.NETCore.App are not specified as shown below:

enter image description here

I tried to unload and reload a project, also I tried run dotnet restore but neither helped. What is more I downloaded VS 2022 on my personal PC, created ASP.NET Core Web App and everything works fine. I don't know how to resolve this and any help will be really appreciated.

Dai
  • 141,631
  • 28
  • 261
  • 374
sadurator
  • 111
  • 1
  • 2
  • 6
  • This is the same error, does restarting VS (and/or nuking your `.vs` project subdirectory) work? https://stackoverflow.com/questions/42971449/vs2017-the-operation-failed-as-details-for-project-could-not-be-loaded/55029912 – Dai Feb 14 '22 at 16:36
  • @Dai I tried to restart VS, but it does not help. – sadurator Feb 14 '22 at 16:39
  • Hmm, sounds like a bug in VS then (and VS has a lot of them lately...). Have you filed a bug via the "Report a Problem" button in the top-right of VS? – Dai Feb 14 '22 at 16:40
  • Not yet, but I will. – sadurator Feb 14 '22 at 16:43
  • Open the installer program and try to repair or reset visual studio. – Jiale Xue - MSFT Feb 15 '22 at 02:06
  • @JialeXue-MSFT I have already done that but it doesnt help :( – sadurator Feb 15 '22 at 07:38
  • Is the corresponding sdk of .net core installed correctly? Are there any files or folders on the computer that require permission to access? Have you used antivirus software? Antivirus software will also affect and prevent VS from finding the corresponding files. – Jiale Xue - MSFT Feb 15 '22 at 07:50

0 Answers0