[Compile Error] missing include files (IntelliSense)

Some days ago I tried to upgrade my project from UE 4.19 to 4.20.1. I was one of those people who had to wait for 4.20.2 because of the missing IntelliSense links for the include files. But this still does not work. I use VS 2017 as it is recommended for 4.20+.

I get over 1000 errors from IntelliSense like cannot open source file "AssetBundleData.generated.h". How do I fix this very annoying bug?
The compiler output also mentions a file called new in ue_4.20\engine\source\runtime\core\public\HAL/PlatformCrt.h(5) which does not exist. Does this refer to the same issue?

Right click on the UE4 project file → Generate Visual Studio project files.

If this does not help:

  1. Delete the folders: .vs, Binaries, Build, Intermediate and Saved.
  2. Delete .sln file.
  3. Right click on the UE4 project file → Generate Visual Studio project files.
  4. Open the .sln file and compile

This solved the issue for the *.generated.h files not being found by IntelliSense. Thanks!
But I still encounter the issue with the file new mentioned in ue_4.20\engine\source\runtime\core\public\HAL\PlatformCrt.h(5). How do I solve this issue?

Open that file, go to line 5 and post a screenshot or see for yourself if you can see what the error there is.
I have there #include and that file is under:

S:\Program Files (x86)\Visual Studio 2017 Community\VC\Tools\MSVC\14.15.26726\include\new

The line in question is
#include <new>

And the error message I get is
Cannot open include file: 'new': No such file or directory

I have such a file at the location you pointed out. But I do not know why VS does not know that this file is meant.

  • Can you compile your project?
  • Try create another C++ project. Does this error also occur there?

I cannot compile any project due to this error. Even completely new created projects do not compile.

The error message indicates, that the file is not in the include search path. This path should be added when you create the VS project file.
This means that this is either a VS or UE bug.
You can manually add the file path in VS:
Right click on the project (NOT solution) in the Solution explorer → Properties → NMake → Include Search Path → Edit → New Line

The path was actually included. But apparently it did not work. I deinstalled and reinstalled VS and now it works. Thank you very much!

for people who is having problems with IntelliSense, my problem might help some others.
My IntelliSense was working on x86 but not x64

I tried everything to solve it but what had really happened was that I had overwritten the file “C:\Users\username\AppData\Local\Microsoft\MSBuild\v4.0\ Microsoft.Cpp.x64.user.props
with the content from a colleague to build other project.

I added these lines which are the ones which screwed up my x64 Intellisense…


So all I had to do was to REMOVE THEM