# Can't compile from Github source metahost.h missing again

**URL:** <https://forums.unrealengine.com/t/cant-compile-from-github-source-metahost-h-missing-again/429792>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [July 19, 2018, 8:42pm UTC](https://forums.unrealengine.com/t/cant-compile-from-github-source-metahost-h-missing-again/429792 "2018-07-19T20:42:52Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Visnarel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Visnarel](https://forums.unrealengine.com/u/Visnarel)\
**Post date:** [July 19, 2018, 8:42pm UTC](https://forums.unrealengine.com/t/cant-compile-from-github-source-metahost-h-missing-again/429792/1 "2018-07-19T20:42:52Z")

</div>

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

> **[Visual Studio 2017 - NETFXSDK path in ue4.sln](https://forums.unrealengine.com/questions/528328/visual-studio-2017-netfxsdk-path-in-ue4sln.html)**
>
> Greetings. Recently Master was patched to be compatible with VS2017. But for some reason, on my system project got generated w/o path to NETFX (both, include and libs). It’s required by UnrealLightmass. C:\\Program Files (x86)\\Windows...

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

---

<div class="post-metadata">

**Author:** ![Visnarel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Visnarel](https://forums.unrealengine.com/u/Visnarel)\
**Post date:** [July 20, 2018, 12:36am UTC](https://forums.unrealengine.com/t/cant-compile-from-github-source-metahost-h-missing-again/429792/2 "2018-07-20T00:36:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Visnarel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Visnarel](https://forums.unrealengine.com/u/Visnarel)\
**Post date:** [July 20, 2018, 12:39am UTC](https://forums.unrealengine.com/t/cant-compile-from-github-source-metahost-h-missing-again/429792/3 "2018-07-20T00:39:09Z")

</div>

![247905-inherit.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/5/5/3553af0efcca75ccf7f41179e239f1f89744b390.jpeg)

---

<div class="post-metadata">

**Author:** ![Visnarel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Visnarel](https://forums.unrealengine.com/u/Visnarel)\
**Post date:** [August 24, 2018, 6:24am UTC](https://forums.unrealengine.com/t/cant-compile-from-github-source-metahost-h-missing-again/429792/4 "2018-08-24T06:24:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JoMaz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JoMaz](https://forums.unrealengine.com/u/JoMaz)\
**Post date:** [September 5, 2018, 1:26pm UTC](https://forums.unrealengine.com/t/cant-compile-from-github-source-metahost-h-missing-again/429792/5 "2018-09-05T13:26:20Z")

</div>

I faced the same issue. What I did was to install some missing .NET Framework packages as described in this page:

[https://blogs.msdn.microsoft.com/calvin\_hsia/2017/02/13/cannot-open-include-file-metahost-h-no-such-file-or-directory/](https://blogs.msdn.microsoft.com/calvin_hsia/2017/02/13/cannot-open-include-file-metahost-h-no-such-file-or-directory/)

Then I regenerate the solution with GenerateProjectFiles.bat -2017

After that, the compilation completed without issues and I was able to open the Editor

---

<div class="post-metadata">

**Author:** ![dsjolie](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dsjolie](https://forums.unrealengine.com/u/dsjolie)\
**Post date:** [May 5, 2019, 9:51am UTC](https://forums.unrealengine.com/t/cant-compile-from-github-source-metahost-h-missing-again/429792/6 "2019-05-05T09:51:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![looter](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/looter/32/914507_2.png) [@looter](https://forums.unrealengine.com/u/looter)\
**Post date:** [June 1, 2019, 10:23pm UTC](https://forums.unrealengine.com/t/cant-compile-from-github-source-metahost-h-missing-again/429792/7 "2019-06-01T22:23:36Z")

</div>

This is what fixed it for me as well, thanks.

---

<div class="post-metadata">

**Author:** ![kernelkiller](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kernelkiller](https://forums.unrealengine.com/u/kernelkiller)\
**Post date:** [July 26, 2019, 11:42pm UTC](https://forums.unrealengine.com/t/cant-compile-from-github-source-metahost-h-missing-again/429792/8 "2019-07-26T23:42:40Z")

</div>

Confirmed for _fresh computer_ with **only Visual Studio 2019** installed. Actually in that case one _won’t even be able to run_ **GenerateProjectFiles.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.

---

<div class="post-metadata">

**Author:** ![Jamie\_K\_Fabrik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jamie\_K\_Fabrik](https://forums.unrealengine.com/u/Jamie_K_Fabrik)\
**Post date:** [October 4, 2019, 8:19pm UTC](https://forums.unrealengine.com/t/cant-compile-from-github-source-metahost-h-missing-again/429792/9 "2019-10-04T20:19:53Z")

</div>

Ditto! Thanks.

---

<div class="post-metadata">

**Author:** ![Den\_Commander](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Den\_Commander](https://forums.unrealengine.com/u/Den_Commander)\
**Post date:** [October 29, 2019, 5:51pm UTC](https://forums.unrealengine.com/t/cant-compile-from-github-source-metahost-h-missing-again/429792/10 "2019-10-29T17:51:03Z")

</div>

For me too! I`ve spent 2 days to fix it, bui it still don`t work!

---

<div class="post-metadata">

**Author:** ![Den\_Commander](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Den\_Commander](https://forums.unrealengine.com/u/Den_Commander)\
**Post date:** [October 30, 2019, 10:21am UTC](https://forums.unrealengine.com/t/cant-compile-from-github-source-metahost-h-missing-again/429792/11 "2019-10-30T10:21:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e26cae3d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e26cae3d](https://forums.unrealengine.com/u/anonymous_user_e26cae3d)\
**Post date:** [November 5, 2019, 3:03pm UTC](https://forums.unrealengine.com/t/cant-compile-from-github-source-metahost-h-missing-again/429792/12 "2019-11-05T15:03:03Z")

</div>

Too bad it’s impossible to check if correct version of .Net SDK is installed instead of failing build with criptic error.

---

<div class="post-metadata">

**Author:** ![jahtiainen](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jahtiainen/32/738524_2.png) [@jahtiainen](https://forums.unrealengine.com/u/jahtiainen)\
**Post date:** [May 3, 2020, 10:39am UTC](https://forums.unrealengine.com/t/cant-compile-from-github-source-metahost-h-missing-again/429792/13 "2020-05-03T10:39:10Z")

</div>

Same problem with my Windows 7, Visual Studio 2017, and UE4 2.24.3.

Installing .NET Framework 4.6.2 SDK did the trick!
