Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2019 Hanging (not responding) with ASP.NET Core

I am not able to either create or open an ASP.NET Core project using Visual Studio 2019. I left no stone unturned but nothing works so far. Every time opening or creating an ASP.NET Core even with an empty template, Visual Studio starts 'not responding'. I have restarted the PC and run Visual Studio as an admin.

enter image description here

FYI: creating ASP.NET Core using CLI has no issue and I was able to open and run the project using VSCode, but not Visual Studio 2019.

FYI: Visual Studio 2019 Community. Version: 16.5.4

like image 625
Abdulkarim Kanaan Avatar asked May 08 '20 05:05

Abdulkarim Kanaan


1 Answers

It looks like scaffolding problem. Maybe caches are corrupted.

First of all, here's how to clear the Component Cache.

  1. Close Visual Studio (ensure devenv.exe is not present in the Task Manager)
  2. Delete the %USERPROFILE%\AppData\Local\Microsoft\VisualStudio[Search for 16.0_49cb5dea or 16.0]\ComponentModelCache directory
  3. Restart Visual Studio.

You could also need to cleanup your user's temp folder:

%USERPROFILE%\AppData\Local\Microsoft\Team Foundation
%USERPROFILE%\AppData\Local\Microsoft\VisualStudio
%USERPROFILE%\AppData\Local\Microsoft\VSCommon

Then, open the Visual Studio IDE folder in command prompt and Run devenv /resetuserdata from the Visual Studio IDE folder.

like image 144
Erçin Dedeoğlu Avatar answered Nov 15 '22 16:11

Erçin Dedeoğlu