The library hostfxr.dll was found, but loading is failed

alow 10 Reputation points
2023-02-27T07:46:36.3333333+00:00

Window's version is 10. And This occurs when i create c++ file in unreal 5.1. How can i fix it. Originally It works well.

Running UnrealBuildTool: dotnet "..\..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" -projectfiles -project="D:/UnrealProject/MyProject1/MyProject1.uproject" -game -rocket -progress
Failed to load the dll from [C:\Program Files (x86)\dotnet\host\fxr\7.0.3\hostfxr.dll], HRESULT: 0x800700C1
The library hostfxr.dll was found, but loading it from C:\Program Files (x86)\dotnet\host\fxr\7.0.3\hostfxr.dll failed
  - Installing .NET prerequisites might help resolve this problem.
     https://go.microsoft.com/fwlink/?linkid=798306
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,764 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Narendra Adiga 0 Reputation points
    2023-03-06T09:51:21.94+00:00

    Delete the entire dotnet folder(C:\Program Files\dotnet) and install all the SDK's again..

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.