How to resolve error loading required library hostpolicy.dll from C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.24?

Md. Anam Mofazzal Durjoy 5 Reputation points
2023-11-09T02:31:31.84+00:00

I am trying to run some .NET core applications, but I get the following error message: "An error occurred while loading required library hostpolicy.dll from [C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.24]." The HRESULT error code is 0x800700C1. How can I fix this error?

Developer technologies .NET Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Md. Anam Mofazzal Durjoy 5 Reputation points
    2023-11-09T10:32:09.14+00:00

    Uninstalling of dotnet sdk and after reinstalling sdk, it works for me.

    1 person found this answer helpful.
    0 comments No comments

  2. Jiachen Li-MSFT 34,221 Reputation points Microsoft External Staff
    2023-11-09T07:35:50.22+00:00

    Hi @Md. Anam Mofazzal Durjoy ,

    1. Please check whether the hostpolicy.dll file exists in the C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.24 directory.
    2. Check if the following document helps. https://learn.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60#it-was-not-possible-to-find-any-installed-net-core-sdks

    Best Regards.

    Jiachen Li


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


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.