"The library hostfxr.dll was found, but loading it from C:\Program Files (x86)\dotnet\host\fxr\3.1.1\hostfxr.dll failed"

See original GitHub issue
> >dotnet --list-sdks
> Failed to load the dll from [C:\Program Files (x86)\dotnet\host\fxr\3.1.1\hostfxr.dll], HRESULT: 0x800700C1
> The library hostfxr.dll was found, but loading it from C:\Program Files (x86)\dotnet\host\fxr\3.1.1\hostfxr.dll failed
> 
> Installing .NET Core prerequisites might help resolve this problem.
>      https://go.microsoft.com/fwlink/?linkid=798306

I’ve just installed both 64 and 32 bit version of 3.1.101 from https://dotnet.microsoft.com/download/dotnet-core/3.1

The 64 bit version is fine, however the 32 bit version gives the above message.

I’m on Windows 10 (1909, 18363.592), so I think I have all the pre-requisites (that is to say there are none).

How can fix this?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

11reactions
KirillOsenkovcommented, Oct 14, 2021

This is most definitely still an issue:

  • install .NET SDK 64-bit
  • install .NET SDK 32-bit
  • run an app targeting netcoreapp3.1 and compiled with PublishSingleFile
Failed to load the dll from [C:\Program Files (x86)\dotnet\host\fxr\6.0.0-rc.2.21480.5\hostfxr.dll], HRESULT: 0x800700C1
The library hostfxr.dll was found, but loading it from C:\Program Files (x86)\dotnet\host\fxr\6.0.0-rc.2.21480.5\hostfxr.dll failed

Why is it trying to load the x86 hostfxr? Shouldn’t it be trying the 64-bit one?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to load the hostfxr.dll after install net core
I faced the same error and I checked my Web API Program.cs class and found that: .UseIISIntegration() is missing. I added it and...
Read more >
The library hostfxr.dll was found, but loading is failed
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...
Read more >
Failed to load the dll: hostfxr.dll
I run any dotnet function like: c/:>dotnet --help And I get: Failed to load the dll from [C:\Program ...
Read more >
"The library hostfxr.dll was found, but loading it from.. failed ...
NET Core is a prerequisite for the Sitefinity CLI. The error is observed if the wrong version has been installed (64 or x86)....
Read more >
Resolved: The required library hostfxr.dll could not be found
The issue I found to be due to the .NET runtime not being available in the target machine. There could be few basic...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found