Wrong location for UnrealBuildTool

Skipping to the actual question: UE seems to be trying to load UnrealBuildTools from both an old location as well as a nonexistant location and I don’t know where it is getting these wrong locations from in order to change it. How can I change it?

How I got here / Steps taken so far:

I downloaded UE5 and after a couple hiccups got it to create a new Project based off 3rd Person starter. Partway through some experimentation unreal crashed. Boo.

Now trying to reload project, I got error: “The following modules are missing or built with a different engine version: [ProjectName]. Would you like to rebuild them now?”

If I hit yes, I get error: [ProjectName] could not be compiled. Try rebuilding from source manually."

Okay, I load up VS and everything builds just fine. Try to start project again, get same errors. So that’s not the problem.

Go to project’s “.uproject” fle, right click, and “Generate Visual Studio Project Files”.

Error: “Failed to generate project files…” … And an error box with a fairly long message.

Problem 1: Near the beginning of the message there’s:

Running D:/Programs/Epic Games/UE_5.0EA/Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.exe -projectfiles -project=“D:/Users/Natalie/Documents/Unreal Projects/ue5rel_perspective1/ue5rel_perspective1.uproject” -game -rocket -progress -log=“D:\Users\Natalie\Documents\Unreal Projects\ue5rel_perspective1/Saved/Logs/UnrealVersionSelector-2022.04.14-07.22.22.log”

So its running the 5.0 Early Access buildTool instead of the actual 5.0 build tool. However, the project was created as, and is listed as, a regular 5.0 project and I don’t see anything in the project config files that lists the early access versions.

Problem 2: This is where the actual error occurs:

Could not load file or assembly ‘UnrealBuildTool, Version=, Culture=neutral, PublicKeyToken=null’. The system cannot find the file specified.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at UnrealBuildTool.RulesAssembly…ctor(RulesScope Scope, List1 BaseDirs, IReadOnlyList1 Plugins, Dictionary2 ModuleFileToContext, List1 TargetFiles, FileReference AssemblyFileName, Boolean bContainsEngineModules, Nullable1 DefaultBuildSettings, Boolean bReadOnly, Boolean bSkipCompile, RulesAssembly Parent) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\System\RulesAssembly.cs:line 138 at UnrealBuildTool.RulesCompiler.CreateProjectRulesAssembly(FileReference ProjectFileName, Boolean bUsePrecompiled, Boolean bSkipCompile) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\System\RulesCompiler.cs:line 566 at UnrealBuildTool.ProjectFileGenerator.AddProjectsForAllTargets(PlatformProjectGeneratorCollection PlatformProjectGenerators, List1 AllGames, List1 AllTargetFiles, String[] Arguments, ProjectFile& EngineProject, List1& GameProjects, Dictionary`2& ProgramProjects) in d:\build++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\ProjectFiles\ProjectFileGenerator.cs:line 2211
at UnrealBuildTool.ProjectFileGenerator.GenerateProjectFiles(PlatformProjectGeneratorCollection PlatformProjectGenerators, String[] Arguments) in d:\build++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\ProjectFiles\ProjectFileGenerator.cs:line 783
at UnrealBuildTool.GenerateProjectFilesMode.Execute(CommandLineArguments Arguments) in d:\build++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Modes\GenerateProjectFilesMode.cs:line 239
at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in d:\build++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 565
System.IO.FileNotFoundException: Could not load file or assembly ‘UnrealBuildTool, Version=, Culture=neutral, PublicKeyToken=null’. The system cannot find the file specified.
File name: ‘UnrealBuildTool, Version=, Culture=neutral, PublicKeyToken=null’

This is making a bunch of references to “d:\build.…”, which doesn’t exist, though maybe its a temp directory used during the build process idk.

[edit for completeness]: checking the solution files for links to locations, the uproject file only has links to “…........\Programs\Epic Games\UE_5.0\Engine\Extras\VisualStudioDebugging\Unreal.natvis”, which is the correct UE version. The sln file has no links at all.

Seems like either the issue is using the EA buildTool, or its the ficticious d:\build location, but either way I’m having trouble finding where either is coming from in order to fix it.