12
votes

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

1

1 Answers

24
votes

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.