Compile error: ProjectName is Undefined

After upgrading to 4.12, I’ve been getting compile errors underlining the GENERATED_BODY() macros. When I mouse over it, it says “identifier ‘ProjectName’ is Undefined”. I also get a bunch of other errors like AActor is undefined.

I’ve tried rebuilding the entire solution and regenerating VS files to no avail. How do I fix this?