错误是这样的。
Running C:/Program Files/Epic Games/UE_5.0/Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.exe -projectfiles -project="C:/Users/Person/Documents/Unreal Projects/Testing/Testing.uproject" -game -rocket -progress
A fatal error occurred. The required library hostfxr.dll could not be
found.
If this is a self-contained application, that library should exist in [C:\Program Files\Epic Games\UE_5.0\Engine\Binaries\DotNET\UnrealBuildTool\].
If this is a framework-dependent application, install the runtime in the global location [C:\Program Files\dotnet\] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x64\InstallLocation].
.NET Core 运行时可以在以下位置找到:
- https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=win10-x64
您必须安装 Visual Studio(19 或 22)以及:
工作负载:
组件:
在您的情况下,UnrealBuildTool 要求
.NET Core 3.1
,但您可以使用我列出的内容下载并配置整个 VS。
应该可以避免日后的混乱。