I’ve recently migrated an Unreal Engine project, and while the project itself works fine, I’m encountering a frustrating issue when trying to open any of the Unreal Engine built-in source code files in Visual Studio. I’m getting thousands of errors like this:
This problem is affecting all other includes as well. My project is a migration from another project, and I copied over the config files and other related settings. However, it seems like there might be a mistake somewhere in the process.
Here’s what I’ve tried so far:
- Rebuilding the solution and regenerating Visual Studio project files.
- Deleting the
Intermediate
,Saved
, andBinaries
folders and regenerating the project files. - Verifying the include directories and engine paths in Visual Studio.
- Comparing
.Build.cs
and.Target.cs
files with a working project.
None of these steps have resolved the issue. Has anyone experienced something similar, or does anyone have any suggestions on how to fix this?
2
Answers
in the Rider – clean and invalidate all cache. don’t open project yet.
delete all folders that you mentioned and .idea, .vs folders and just in case .vsonfig and .sln files.
regenerate VS files then. and open through .sln
I don’t know your steps of upgrading to 5.4, but I had troubles migrating 5.3.2 to 5.4.4, got some warnings about specific migration flags regarding backward-compatibility flags (bLegacyParentIncludePaths, CppStandard, WindowsPlatform, bValidateFormatStrings, IncludeOrderVersion), the most important was related to an error:
FPSGameEditor modifies the values of properties: [ bStrictConformanceMode ]. This is not allowed, as FPSGameEditor has build products in common with UnrealEditor. Remove the modified setting, change FPSGameEditor to use a unique build environment by setting 'BuildEnvironment = TargetBuildEnvironment.Unique;' in the FPSGameEditorTarget constructor, or set bOverrideBuildEnvironment = true to force this setting on.
Tinkering with various suggestions made the editor and build tools not see any engine files at all, like in your case.
So here is what fixed for me:
DefaultBuildSettings = BuildSettingsVersion.V4;
(or V5, these basically change the way the build tools use the newer standards from C++ v17 to C++ v20).Will be very useful to have the debugging symbols installed along with the engine source so in case of crashes you can determine where is the problem.