Just cleared out my old 4.18 build to put in a 4.2 build and it’s throwing the old
Cannot open include file: ‘metahost.h’: No such file or directory
pretty much the same problem as shown here
but even after explicitly running with -2017 on the generateprojectfiles.bat it’s still throwing that error… the file is in the 8.1 sdk in the um directory… which is part of the search path, but it’s still not seeing it
In my case, it was the VC++ Directories for the UE4 properties causing the problem, they were set to blank by default for some reason, they all need to be set to inherit
Just updated to 4.20.2 and the same thing happened, this time it still won’t compile with inherit set… It’s pointing to the correct SDK directory for it, and it still won’t see the header
If someone else runs into this now - I got this error compiling Unreal Engine, version 4.22.1 from github release branch, on a fresh computer with only Visual Studio 2019 installed.
It was resolved by adding “.NET Framework 4.6.2 SDK” as an Individual component to the Visual Studio install, as indicated above.
Confirmed for fresh computer with only Visual Studio 2019 installed. Actually in that case one won’t even be able to runGenerateProjectFiles.bat without installing .Net Framework 4.6.2 Target (i.e. Runtime) first.
Notice if project file was generated before installing .Net Framework 4.6.2 SDK, then one needs to regenerate the project file by running GenerateProjectFiles.bat.
Also regenerating project file will require re-compilation of whole solution.
Resolved. Should use 4.6.2 SDK ONLY. I tried to use 4.7.2 and 4.8 and had a problem. But it`s hardcoded inside of UE unrealbuildtool Engine\Source\Programs\UnrealBuildTool\Platform\Windows\UEBuildWindows.cs
“TryReadInstallDirRegistryKey32(“Microsoft\Microsoft SDKs\NETFXSDK\4.6.2”, “KitsInstallationFolder”, out OutInstallDir);”
So, in next versions of UE maybe SDK version will change to another. Check it by yourself.