How to fix Visual Studio 2022 Add New Scaffold Item 'There was an error running the selected code generator'

Al Thafari, Alaa 10 Reputation points
2023-11-24T19:51:27.35+00:00

Hi,

I have a project that had several controllers before. I decided to add a new controller today. However, every time I try to create the controller I get the same error 'There was an error running the selected code generator'.

I looked up the fix on the internet and even on the learn website, but none of them worked. The options that needs to be installed are installed already, and the packages are all installed.

Did anyone figure out other solutions to this please ?

Developer technologies | ASP.NET | ASP.NET Core
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.