Cannot Hot-Reload with Unreal Build from source (5.4)

I have built unreal by running ./Setup.bat, ./GenerateProjectFiles.bat and Building from the resulting visual studio solution.

I right click my project and Open it with the resulting unreal binary. My project is compiled correctly

However when I making changes in my game code and trying to hot reload: It says that hot-reloadable files are expected to contain a hyphen. In other words hot reload is broken.

1>------ Build started: Project: MyGame, Configuration: Development_Editor x64 ------
1>Using bundled DotNet SDK version: 6.0.302
1>Running UnrealBuildTool: dotnet "..\..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" -Target="MyGameEditor Win64 Development -Project=\"C:\repos\mygame\MyGame\MyGame.uproject\"" -Target="ShaderCompileWorker Win64 Development -Quiet" -WaitMutex -FromMsBuild -architecture=x64
1>Log file: C:\repos\UnrealEngine\Engine\Programs\UnrealBuildTool\Log.txt
1>Using 'git status' to determine working set for adaptive non-unity build (C:\repos\UnrealEngine).
1>Using 'git status' to determine working set for adaptive non-unity build (C:\repos\mygame).
1>Waiting for 'git status' command to complete
1>Total execution time: 3.25 seconds
1>Hot-reloadable files are expected to contain a hyphen, eg. UnrealEditor-Core
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "C:\repos\UnrealEngine\Engine\Build\BatchFiles\Build.bat -Target="MyGameEditor Win64 Development -Project=\"C:\repos\mygame\MyGame\MyGame.uproject\"" -Target="ShaderCompileWorker Win64 Development -Quiet" -WaitMutex -FromMsBuild -architecture=x64" exited with code 6.
1>Done building project "MyGame.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 11 up-to-date, 0 skipped ==========
========== Build started at 11:45 PM and took 04.012 seconds ==========


I have to modify HotReload.cs to skip UnrealEditor.exe, UnrealEditor.lib, etc. Somehow these are being processed. I wonder why? Please address this EPIC.

		public static List<LinkedAction> PatchActionsForTarget(BuildConfiguration BuildConfiguration, TargetDescriptor TargetDescriptor, TargetMakefile Makefile, List<LinkedAction> PrerequisiteActions, List<LinkedAction> TargetActionsToExecute, Dictionary<FileReference, FileReference>? InitialPatchedOldLocationToNewLocation, ILogger Logger)
		{
...
				// Build a list of file mappings
				Dictionary<FileReference, FileReference> OldLocationToNewLocation = new Dictionary<FileReference, FileReference>();
				foreach (FileItem FileRequiringSuffix in FilesRequiringSuffix)
				{
					FileReference OldLocation = FileRequiringSuffix.Location;
					// ADDED
					// Skip UnrealEditor.exe, UnrealEditor.lib, etc.
					if(OldLocation.GetFileName().StartsWith("UnrealEditor."))
						continue;
					FileReference NewLocation = HotReload.ReplaceSuffix(OldLocation, HotReloadState.NextSuffix);
					OldLocationToNewLocation[OldLocation] = NewLocation;
				}
...
}

It seems when building from source we’re incorrectly Hot-Reloading a bunch of UnrealEditor modules incorrectly. For a single file change, I have over 900 targets when hot reload, maybe 1 or 2 otherwise.

I am just interested in hot reloading my project libraries:

https://github.com/EpicGames/UnrealEngine/pull/11188

Im currently unable to compile the newest ver of 5.4. I know there have been issues with newer version of visual studio. However Ive been unable to compile with either version 17.8,17.9,17.10(preview). Have you experienced this issue aswell ?

Try build from editor
image

try this sdk version
CurrentVersion_Sdk=10.0.22621.0

You can follow this steps

However i have a littel problem with hot-reaload too

I’m looking for a solution

How do you solved it finaly?