Error under colon for inheriting from UActorComponent

Common solutions:

  • Relaunch Visual Studio
  • Refresh color scheme
  • Install the latest update
  • Refresh Visual Studio Projects button under File menu bar
  • Final solution: If you are unsatisfied with your current IDE try another one. My recommendation is Rider (https://www.jetbrains.com/lp/rider-unreal/)

Error 1:
I simply created a new c++ component for a door in UE4. However I am getting a red line under the colon on line 10 in the header file.

Error 2:
In the .cpp file for the component, Visual Studio 2019’s intellisense is not working and there is a red line under every method.

Note: The solution file is building despite of all the red lines.alt text

My visual studio is already up to date and refreshing the color scheme/ relaunching VS did not work. I tried refreshing the projects as well but to no avail. Is there any other solution that I should try fot this?

Try reseting the entire project:

  1. delete directories: .vs, binaries, build, intermediate, saved;
  2. delete files: *.sln, *.vc.db;
  3. open .uproject file and rebuild
  4. right click .uproject file and generate vs project files

PS: backup the project before trying this.

This worked!! You, Sir have saved my life! Thanks a lot!