Errors when adding a C++ class

I added a C++ class in blueprint project and thousands or errors popped up. Plus there is no .generated.h file to be found. Any clue what I am missing or doing wrong?

UE 4.25 and VS 2019.
Thanks

First thing you can try is this:

  1. Navigate to your project’s folder in the file browser
  2. Delete the folders “Binaries” and “Intermediate” and then you also delete the file “yourProjectName.sln” (or better move them outside to a backup folder in case something goes wrong)
  3. Right click on “yourProjectName.uproject” and select “Generate Visual Studio project files”
  4. A new “yourProjectName.sln” file should appear in the folder.
  5. Double click the .sln file → your project opens in VisualStudio
  6. Compile to check if errors are gone

Thanks for the reply.

I followed exact steps and at the end built the solution with success.
However errors are still there and I still don’t see a .generated.h file for created new class.
When does this file get generated normally? Is there something I need to setup in editor or visual studio to make sure the file does get generated? I suspect the errors are due to file not being there.

Actually the errors went away in short while.
Intellisense took longer than expected but it seems your steps worked. Regardless of no .generated.h file.

Thanks