Problem with New Projects 4.20.0 - Cannot Open Source Files

So I just updated from 4.19.2 or something to the latest UE4 version, and when I now create a new C++ Project with “Blank Code” and add a New Class (Like an Actor) to it, Visual Studio pops out a big bunch of errors, for example:

E1696 The File “source” can not be opened: “ActorComponent.generated.h”. TUTORIAL c:\Program Files\Epic Games\UE_4.20\Engine\Source\Runtime\Engine\Classes\Components\ActorComponent.h 17

It is a clean new project, so probably some SDK is outdated, idk. Help pls!

Visual Studio Version: VS2017 Professional

Bump.
Facing the same issue. Also had it in the UE 4.20 preview versions

I also have the same issue. I hope this has some kind of solution because it makes intellisense completely unusable.

I actually didn’t have that on 4.19.0 - so I was really confused when this showed up.

Yea it’s the same for me.
Btw, it’s alright for you to use 4.19 and switch to 4.20 whenever this intellisense error is fixed
Just right click .uproject file and switch engine version when you need to.

Same for me!

I had the same question, damnd, didn’t find your question, when I was searching for this issue: UE4.20 is missing the IntelliSense IncludePath for the *.generated.h files - Platform & Builds - Unreal Engine Forums
Short: IntelliSense includes pathes are missing

@Taberu
It’s been fixed in 4.20.2 update

Same issue here. Any new info?

@RyujinIshima Actually, I thought I resolved the issue but when I added a new class to my project, the IntelliSense got crazy again.

Did you rightclick your *.uproject and regenerated the project files?

I just tried it, sadly no real effect.

You can try using my python 3.6 script, which should add most of the missing includes paths: UE4.20 is missing the IntelliSense IncludePath for the *.generated.h files - Platform & Builds - Unreal Engine Forums
And could you describe you problem in more detail?

I just switched to 4.19 where I had no issues and now after adding a c++ class, IntelliSense is outputting the same bulls**t as in 4.20, it looks exactly the same as in the Dyshaxo’s screen shot above.

Here is also the output when I press rebuild in VS, clean project with 1 additional c++ class:

1>------ Rebuild All started: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------
2>------ Rebuild All started: Project: ProjectName, Configuration: Development_Editor x64 ------
2>Cleaning ProjectNameEditor Binaries...
2>UnrealBuildTool : error : Unable to clean target while hot-reloading. Close the editor and try again.
2>Creating makefile for hot reloading ProjectNameEditor (modules to compile have changed)
2>Compiling game modules for hot reload
2>Target is up to date
2>Deploying ProjectNameEditor Win64 Development...
2>Total build time: 24,86 seconds (NoActionsToExecute executor: 0,00 seconds)
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(49,5): error MSB3073: The command ""C:\Program Files (x86)\Epic Games\UE_4.19\Engine\Build\BatchFiles\Rebuild.bat" ProjectNameEditor Win64 Development "<my_path>\ProjectName\ProjectName.uproject" -WaitMutex -FromMsBuild" exited with code -1.
2>Done building project "ProjectName.vcxproj" -- FAILED.
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

Do you have any idea why is it like that? Thank you for your time!

Well the error says Unable to clean target while hot-reloading. Close the editor and try again.
For the rest, no Idea, since the information you give me are not enough^^

Indeed, closing editor allowed VS to execute the clean up properly, but I just considered it irrelevant. I’m not sure if there are less errors after rebuilding the project. I tried to regenerate project files as well, no difference. What left is this small syntax error about missing ‘)’ in my code, here is a screen shot:

251634-expected.png

When I click the error, it takes me to Atomic.h (which is not my project’s file) and oh my, IntelliSense displays 5431 errors there. Here is a screen shot:

I will try to turn off IntelliSense and do my small project for now. I don’t have much time to fix VS problems when these are not blocking my progress.

Thank you for your help! Maybe in a month I will have to try to fix it, maybe an update will fix it for me, who knows. If you have any more thoughts, let me know!

I found the following solution here: Atomic.h Error in all new Projects - Programming & Scripting - Epic Developer Community Forums

It says that the “ApplicationCore” module has to be added to PublicDependencyModuleNames. For me this solved the Atomic.h error.

You’re saying that changing:

PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });

to:

PublicDependencyModuleNames.AddRange(new string[] { "ApplicationCore", "Core", "CoreUObject", "Engine", "InputCore" });

fixed the expected a ')' error? :\