C++ in Unreal Engine 5 Error

Hello, I can’t create a C++ game in Unreal Engine 5, it gives an error all the time, there are no problems with Blueprint, but when I want to do something in C++, such an error comes out.

Running C:/Program Files/Epic Games/UE_5.0/Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.exe -projectfiles -project=“C:/Users/Andrei/MyProject/MyProject.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].

The .NET Core runtime can be found at:

Please help me, please tell me how to fix this problem.

It looks like you’re just missing the .NET framework like it’s saying. The DLLs are missing. Are you building from source? If so, download the .NET and rebuild the engine. When you’re setting up visual studio you should try checking out the set up from the unreal documentation. It’ll walk you through all the tools you need to include when setting up visual studio the first time. I’d post the link, but don’t have it readily available.

1 Like

Thank you very much for your help, you helped me a lot

1 Like