core icon indicating copy to clipboard operation
core copied to clipboard

Can not use dotnet command because of loading hostfxr.dll failed

Open maonaoda opened this issue 1 year ago • 0 comments

URL(s)

https://github.com/dotnet/core/blob/main/release-notes/8.0/8.0.2/8.0.201.md

Description

After I upgraded Microsoft Visual Studio 17.9.0 (windows), there seemed to be something wrong with the local dotnet environment, So I deleted the local C:\Program Files\dotnet folder and used the downloaded dotnet-sdk-8.0.201-win-x64.exe to repair it. After that, my dotnet command could not be used at all.

>dotnet --version

Failed to load the dll from [C:\Program Files\dotnet\host\fxr\8.0.2\hostfxr.dll], HRESULT: 0x800700C1

The library hostfxr.dll was found, but loading it from C:\Program Files\dotnet\host\fxr\8.0.2\hostfxr.dll failed

  - Installing .NET prerequisites might help resolve this problem.

    
https://go.microsoft.com/fwlink/?linkid=798306

maonaoda avatar Feb 21 '24 02:02 maonaoda