【报错修复】HRESULT: 0x80070057 The library hostfxr.dll was found, but loading it from C:\Program Files\dotnet\host\fxr\5.0.17\hostfxr.dll failed
我写了一个winform程序,
拷贝到win7系统上,提示需要下载.net 给的链接是
https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=win7-x64&apphost_version=5.0.3&gui=true
这台win7上不了网
我用win10下载了这个链接的桌面运行时 windowsdesktop-runtime-5.0.17-win-x64.exe
拷贝到win7后安装
再次双击winform程序,这次什么都没有响应
打开事件查看器,
发现加载 C:\Program Files\dotnet\host\fxr\5.0.17\hostfxr.dll 的时候
HRESULT: 0x80070057 The library hostfxr.dll was found, but loading it from C:\Program Files\dotnet\host\fxr\5.0.17\hostfxr.dll failed - Installing .NET prequisities might help resolve this problem. https://go.microsoft.com/fwlink/?linkid=798306
直接把报错扔给ChatGPT,给了些广泛不具体的建议。
然后把报错扔给Google,找到了这个帖子。
KB3063858 fixed the problem for me!
32-bit: https://www.microsoft.com/en-us/download/details.aspx?id=47409
64-bit: https://www.microsoft.com/en-us/download/details.aspx?id=47442
—— https://www.reddit.com/r/windows/comments/ik7sp7/does_anybody_have_the_kb2533623_update_for/
下载安装这个用于基于 x64 的系统的 Windows 7 安全更新程序 (KB3063858)
(对应的是MS15-063安全公告)
问题解决!