Failed to load the hostfxr.dll after install net core


Anyone has this problem i change Pc and tried to install net core framework but vs code return this info when i tried to write dontet --info

Failed to load the dll from [C:\Program 
Files\dotnet\host\fxr\2.1.0\hostfxr.dll], HRESULT: 0x80070057
The library hostfxr.dll was found, but loading it from C:\Program 
Files\dotnet\host\fxr\2.1.0\hostfxr.dll failed
- Installing .NET Core prerequisites might help resolve this problem.
asked on Stack Overflow Jun 1, 2018 by Tom Karnaski

2 Answers


Installing this update will solve the problem for Windows 7:

answered on Stack Overflow Jun 14, 2018 by Braytiner • edited Jun 13, 2019 by Matt

I faced the same error and I checked my Web API Program.cs class and found that: .UseIISIntegration() is missing. I added it and the problem solved.

public class Program
    public static void Main(string[] args)

    public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
answered on Stack Overflow Jan 16, 2019 by Mohammed Osman • edited Jun 13, 2019 by Mohammed Osman

User contributions licensed under CC BY-SA 3.0