I’ve been trying to compile the preview version for 4.23 from source (with Chaos enabled), and this error has been persistently occurring, looks like this is a quite common issue with the #include <metahost.h>
For me it was in the file SwarmInterface.cpp in \Engine\Source\Editor\SwarmInterface\Private\
I haven’t had any luck in solving this yet, first I redownloaded the repo and went through the setup process again, and the problem persisted.
Then I figured it might be as easy as adding the full path to the file (for me it is installed as a part of .NET SDK v4.6.2) so I tried it. That resulted in the following three errors:
E0147: declaration is incompatible with “NSwarm::FLogCategoryLogSwarmInterface NSwarm::LogSwarmInterface”
LNK1104 cannot open file ‘mscoree.lib’
MSB3075: The command “…\Build\BatchFiles\Build.bat -Target=“UE4Editor Win64 Development” -Target=“ShaderCompileWorker Win64 Development” -WaitMutex -FromMsBuild” exited with code 5. Please verify that you have sufficient rights to run this command.
spent the day struggling with this (in the new, official 4.23 release branch), then found the issue: the UE4 build tool is looking for .NET SDK v4.6.1 or v.4.6.
Snag one of those components (by modifying your installation of VS in the Visual Studio Installer) and you should be all set to recompile - it solved my identical issue.
All I did was add the 4.6.1 SDK and the 4.6.1 targeting pack. Not sure which one solved - I also currently have the 4.6 targeting pack. (I probably have too many of those!)
I tried that and got the same errors as before. However, I will mark your answer as correct regardless. I will be updating this thread if I manage to solve it.