Missing UnrealBuildTool.exe after build

Hi, so after recent update of Microsoft Visual Studio 2022 to version 17.14.19 and rebuilding my Unreal Engine from source, I got this error when I right click on .uproject file and choose either Generate Visual Studio project files or Switch Unreal Engine version…

Building UnrealBuildTool in C:/P/UE4.27-plus…
Running: C:\Windows\``Microsoft.NET``\Framework\v4.0.30319\MSBuild.exe /nologo /verbosity:quiet “C:/P/UE4.27-plus/Engine/Source/Programs/UnrealBuildTool/UnrealBuildTool.csproj” /property:Configuration=Development /property:Platform=AnyCPU
Missing C:/P/UE4.27-plus/Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.exe after build

I use Unreal Engine 4.27-plus from Unreal Github, the UnrealBuildTool.exe actually exist in the DotNET folder, but I don’t know why it suddenly search for the file inside UnrealBuildTool folder, is there a possible solution without reverting the Microsoft Visual Studio to previous version, because I’m not even sure if that could solve this issue.

2 Likes

Did you find any solution for this ? I also have the same issue.

1 Like

Unfortunately no, I recently saw some people complaining about this issue to other posts too on retail Unreal Engine from Epic Games Launcher though, but still no answer.

1 Like

I am having the exact same issue, seems like a bug to me, didn’t figure out anything yet

1 Like

Hey, I was able to generate the project by another method, and now I’m not having any issues at all. What I did was run this command in the terminal:
"E:\UnrealEngine-4.27-plus\Engine\Build\BatchFiles\GenerateProjectFiles.bat" -project="E:\Projects\Project\MyProject.uproject" -game -progress"
After that, my project files were generated correctly.

2 Likes

Is your engine from source code or from the installer? I don’t have \GenerateProjectFiles.bat, I am using 4.27.2 and VS 2022

Hey, I’m also using the source version of Unreal Engine 4.27.2.
The GenerateProjectFiles.bat file is only available in source builds, not in the installed (launcher) version.

If you also built your engine from source, you should find it under:

<YourEngineFolder>\Engine\Build\BatchFiles\GenerateProjectFiles.bat

If you’re trying to generate the project’s .sln file, just make sure you’re pointing the command to your .uproject file like this:

<EnginePath>\Engine\Build\BatchFiles\GenerateProjectFiles.bat -project="<PathToYourProject>\YourProject.uproject" -game -progress

That should regenerate your solution file correctly.

1 Like

i have the same question
■■■■ Microsoft

hi , if UnrealBuildTool.exe exists in the DotNET folder , can you try to run it on PowerShell ?

if it runs properly , you could try to make a symbolic link from DotNET folder to UnrealBuildTool folder for UnrealBuildTool.exe

By doing that you mess up the other paths, I tried it right now

Okay, I found a way to fix it:

If you use installer(launcher) version as I do, run epic launcher, choose your project, wait UE4.27.2 to load, when it loads under the “File” dropdown, find the line to generate project files

If that doesn’t work, ping me, I’ll try to figure it out because I have tried multiple other ways…

1 Like

The problem is in new UnrealVersionSelector in EGS Laucher:
Epic Games\Launcher\Engine\Binaries\Win64\UnrealVersionSelector.exe

I replaced it (temporary) by another one (from UE 4.27, old sources build) and it’s works now! They updated Launcher and this breaks work with UE4 projects…
I need more time to investigate what exactly changed, but I try to do same thing in VM and have same results: UE4 uprojects can’t generate *.sln.

P.S. Problem in code (last string):

FString FDesktopPlatformBase::GetUnrealBuildToolExecutableFilename(const FString& RootDir) const
{
    FConfigFile Config;
    if (FConfigCacheIni::LoadExternalIniFile(Config, TEXT("Engine"), *FPaths::Combine(RootDir, TEXT("Engine/Config/")), *FPaths::Combine(RootDir, TEXT("Engine/Config/")), true, NULL, false, /*bWriteDestIni*/ false))
    {
       FString Entry;
       if( Config.GetString( TEXT("PlatformPaths"), TEXT("UnrealBuildTool"), Entry ))
       {
          FString NewPath = FPaths::ConvertRelativePathToFull(RootDir / Entry);
          return NewPath;
       }
    }
  

    return FPaths::ConvertRelativePathToFull(RootDir / TEXT("Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.exe")); // Only valid for UE5!
}

You can fix it in code, but also it’s can be simple fixed in DefaultEngine.ini (per project) or in BaseEngine.ini (per Engine). Just add this:

[PlatformPaths]
UnrealBuildTool=Engine/Binaries/DotNET/UnrealBuildTool.exe
18 Likes

@Alex_Green Thanks a lot!

1 Like

@Alex_Green Your method is effective, and I really appreciate you generously sharing your wisdom.

1 Like

@Alex_Green Thank you!

1 Like

Solution real fix this problem!!!