VS17 now requires full include path

For some reason I can’t compile my game anymore because VS17 says it can’t find the headers. Even on a brand new project.

When I create a new class from the UE4 C++ Wizard, the #include in the class .cpp looks as you would expect:
#include "NewActor.h" Which used to work for me.

But now VS is only accepting the includes with the complete project path:
#include "MyProject/Public/Folder/MyActor.h" otherwise it says it can’t open the source file or that the file or directory doesn’t exist.

I imagine it might have to be with the latest version of VS17 (15.9.23)?
My Engine version is the latest 4.25 from GitHub. But the same happens on Launcher 4.25

Could it be something I’m missing?

Ok, so it never went away with further updates.
It would seem Unreal Build Tool is supposed to automatically include all public paths, but it just isn’t in my case.
So the solution was to manually add them on my Project.build.cs file.

PublicIncludePaths.AddRange(
    new string[] {
        "Project/Public",
        "Project/Public/Something",
        "And so on..."
    }
);
2 Likes