UPROPERTY on TEnumAsByte causes compile error

I ran into this same error today even though the syntax was correct after triple-checking it all over. I tried forward declarations and that did not work. I did notice that Visual Studio stopped colorizing the tags in my code, so I decided to try something that fixed other issues I’ve had…

If time isn’t a constraint, try:

  1. Close UE4 and Visual Studio
  2. Delete Binaries and Intermediate Folders
  3. Right-click *.uproject file and generate new Visual Studio project files
  4. Re-open UE4 and Visual Studio. Compile in Engine.

Worked for me as of 4.25.4