UE4.20 is missing the IntelliSense IncludePath for the *.generated.h files

Just updated my Engine to 4.20 (from source) and my VS2017 Projectfiles (regenerated) are missing the Include Path for the *.generated.h files. It still builds, but IntelliSense can’t finde the headers. Adding the path by hand fixes it, but this isn’t a real solution. Does anybody know, what in code I have to change, so the include will be added?

edit:

As workaround:

Right-click the Project->Properties->NMake->IntelliSense->Include Search Path, and there you just need to add:
..\Build\Win64\UE4Editor\Inc\$(ProjectName)

edit2

Update: also the Engine Project doesn’t seem to have those IncludePaths for their generated files, so my guess it, that this is the effect of a change to the UnrealBuildTool

I’m also having this problem. How did you add the headers by hand? What path are they in?

Eh its $(SolutionDir)Intermediate\Build\Win64\UE4Editor\Inc\NameOfYourProject
In an older Project, I didn’t regenerated it was written as …\Build\Win64\UE4Editor\Inc\NameOfYourProject
Both should work (since they are the same^^)

And for the How: Rightclick the Project->Properties->NMake->IntelliSense->Include Search Path, and there you just need to add it.

Did you try, what I replied to TacoShank?

Ah, now I got it. They are located at different places, so you have to add all those Paths to your included paths. Why do you need them to be recognized by intellisense? Do you actually modify Engine Sources?

just to be sure: that is just IntelliSense, but you can still build right?

then its like I said, you will have to add all include paths for those files. Or you will have to Ignore those errors until a fix comes up^^ Or someone figured out what has to be reverted, so those will be added by GenerateProjectFiles.

Same problem here, but project cant find ENGINE generated header files, like assetdata.generated.h and so on.
Couldn’t figure out how to add them by hand…
Except that things compiles and work.

yes, didn’t work.

I didn’t modify engine files, just convert project from 4.19 to 4.20.
Even in fresh 4.19 project with one cpp file and no added code, after convert to 4.20 intellisense show tons of errors about generated.h files

yes, builds from editor and VS without errors

Hey, thanks, will report the issue then^^ Just thought someone could tell, where one could fix it in code :wink:

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://epicsupport.force.com/unrealengine/s/

Thanks

I also had to add the following paths:

C:\Program Files\Epic Games\UE_4.20\Engine\Intermediate\Build\Win64\UE4\Inc\Engine
C:\Program Files\Epic Games\UE_4.20\Engine\Intermediate\Build\Win64\UE4\Inc\InputCore

For me it is

UE_REPOSITORY_ROOT_FOLDER\Engine\Intermediate\Build\Win64\UE4Editor\Inc\InputCore

UE_REPOSITORY_ROOT_FOLDER\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine

That is probably more appropriate. Thanks.

$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\InputCore
$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\Engine

Well that the rootpath may vary is obvious and wasn’t my intention for the replay :smiley: But your UE Project name seems to be just “UE4” and mine (or the one which is given, when building from source) is “UE4Editor” so I have a different Subfolder from “Win64” so people need to check what paths they need.

I’m gonna dump my solution that I came to from [my forum post here][1]. It turns out what others have suggested works, but as you run into new dependencies you will run into new file opening errors and will have to add new include folder paths. With this solution you add all the engine include folders at once so it should cover any project. (Well at least theoretically. It’s possible include errors will show up for other random headers as well)


It’s a little brute force but here’s the solution:

  1. Open up your Visual Studio project properties by right clicking on the project.


  1. Switch to all configurations so the includes we add are added for every configuration.


  1. Click in the “Include Directories” text box and paste the following:

$(SolutionDir)Intermediate\Build\Win64\UE4Editor\Inc\$(SolutionName);$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\AIModule;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\AITestSuite;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\AnalyticsVisualEditing;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\AnimationCore;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\AnimGraphRuntime;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\AssetRegistry;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\AudioMixer;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\AudioPlatformConfiguration;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\AugmentedReality;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\AutomationController;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\AutomationMessages;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\BlueprintRuntime;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\BuildPatchServices;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\CinematicCamera;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\ClientPilot;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\ClothingSystemRuntime;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\ClothingSystemRuntimeInterface;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\CoreUObject$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\EditorStyle;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\Engine;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\EngineMessages;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\EngineSettings;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\EyeTracker;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\Foliage;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\FriendsAndChat;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\GameMenuBuilder;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\GameplayDebugger;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\GameplayTags;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\GameplayTasks;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\HeadMountedDisplay;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\InputCore;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\JsonUtilities;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\Landscape;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\LevelSequence;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\LiveLinkInterface;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\LiveLinkMessageBusFramework;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\Localization;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\MaterialShaderQualitySettings;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\MediaAssets;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\MediaIOCore;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\MeshDescription;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\MessagingRpc;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\MoviePlayer;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\MovieScene;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\MovieSceneCapture;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\MovieSceneTracks;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\MRMesh;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\NavigationSystem;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\Overlay;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\PacketHandler;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\PortalMessages;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\PortalRpc;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\PortalServices;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\ProfilerMessages;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\PropertyPath;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\Renderer;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\RuntimeAssetCache;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\ScreenShotComparisonTools;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\Serialization;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\SessionMessages;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\Slate;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\SlateCore;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\SlateReflector;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\SourceControl;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\TimeManagement;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\UMG;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\UnrealEdMessages;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\VectorVM;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\WebBrowser;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\WidgetCarousel;


  1. For whatever reason if you click apply after pasting now it wont work. So after pasting the above click on the little dropdown button and then click on the <Edit...> option.

Now you should see all of the include paths populated in the window that pops up. Click “Okay” in this window to actually add the pasted include paths.


  1. Finally you can press “Apply” and “Okay” to apply the include paths you have added and close the properties window.


That’s it! Unfortunately Visual Studio is pretty simplistic when it comes to adding include directories. Instead of adding all the folders recurisvely with something like $(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\** we are forced to add every folder manually. Anyways, these include paths should work for any project, with any name, in any location, with UE4 installed to any location. So you don’t really need to worry about anything with this solution, it’s just plug and play.

I hope this helps make the fix for this issue a little easier for everyone!

Ok, little Update, this feature of adding generated files to the include path was removed from the UnrealBuildTool, found the places in code, trying to revert the behavior…

yeah, will do, Its hard to get into the Project, so it can take a while … ^^

edit

hm don’t think that I will make it in next days. Takes too long, without deeper knowledge about the hole system, like “where comes the data from”. Unluckily I don’t have the time to take a rly deep look … hopefully this will get fixed by someone already familiar the code^^