UnrealHeaderTool.target deleted on Project rebuild

I’m having a super weird issues with UE5 (5.0 release). After installing the engine and attemping to rebuild the project in Visual Studio I get the following error related to a missing ‘UnrealHeaderTool.target’ file.

I have validated that the file 'UnrealHeaderTool.target ’ exist after installing the engine. This file is then deleted after I click rebuild in visual studio. It seems it’s not the only file being deleted. After validing the engine there is a number of MBs of files which need to be re-downloaded.

Anyone have a Idea of what causing this?

UnrealBuildTool : error : Unhandled exception: System.IO.FileNotFoundException: Could not find file 'D:\UE4\Precompiled\UE_5.0\Engine\Binaries\Win64\UnrealHeaderTool.target'.
1>                        File name: 'D:\UE4\Precompiled\UE_5.0\Engine\Binaries\Win64\UnrealHeaderTool.target'
1>                           at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
1>                           at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
1>                           at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
1>                           at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
1>                           at System.IO.File.InternalReadAllText(String path, Encoding encoding)
1>                           at EpicGames.Core.JsonObject.Read(FileReference File) in d:\build\++UE5\Sync\Engine\Source\Programs\Shared\EpicGames.Core\JsonObject.cs:line 93
1>                           at UnrealBuildTool.TargetReceipt.Read(FileReference Location, DirectoryReference EngineDir) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\System\TargetReceipt.cs:line 520
1>                           at UnrealBuildTool.TargetReceipt.Read(FileReference Location) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\System\TargetReceipt.cs:line 510
1>                           at UnrealBuildTool.ExternalExecution.GetHeaderToolPath(FileReference ReceiptFile) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\System\ExternalExecution.cs:line 776
1>                           at UnrealBuildTool.ExternalExecution.ExecuteHeaderToolIfNecessary(BuildConfiguration BuildConfiguration, FileReference ProjectFile, TargetMakefile Makefile, String TargetName, ISourceFileWorkingSet WorkingSet) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\System\ExternalExecution.cs:line 1205
1>                           at UnrealBuildTool.UEBuildTarget.Build(BuildConfiguration BuildConfiguration, ISourceFileWorkingSet WorkingSet, TargetDescriptor TargetDescriptor) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildTarget.cs:line 1773
1>                           at UnrealBuildTool.BuildMode.CreateMakefile(BuildConfiguration BuildConfiguration, TargetDescriptor TargetDescriptor, ISourceFileWorkingSet WorkingSet) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 742
1>                           at UnrealBuildTool.BuildMode.Build(List`1 TargetDescriptors, BuildConfiguration BuildConfiguration, ISourceFileWorkingSet WorkingSet, BuildOptions Options, FileReference WriteOutdatedActionsFile, Boolean bSkipPreBuildTargets) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 267
1>                           at UnrealBuildTool.BuildMode.Execute(CommandLineArguments Arguments) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 237
1>                           at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 593

Not sure why this happen but I have the same issue happening…so now I have a local copy of the Binaries and Intermediate folder so I can quickly get back any missing files…

There are another post about it here:


Exact same thing happens for me.

If I do a Clean, then the UnrealHeaderTool.target will be missing from the UE5.0 installation, thus preventing subsequent Builds unless I Verify the installation, to fix the missing file.

This just happened to both myself and my partner as well.

This has been happening to me every time I create a c++ class. Have not been able to find a fix for it yet.

I have just fallen foul to this…

Unhandled exception: System.IO.FileNotFoundException: Could not find file ‘C:\Program Files\Epic Games\UE_5.0\Engine\Binaries\Win64\UnrealHeaderTool.target’.

The project was working fine just prior to my rebuild and now the file is missing?

Solution: I went into the Launch > Options via the Launcher and forced a rebuild by disabling one of the platform options.

This issue has been fixed in the lastest update, Hotfix 5.0.1