本文介绍了发生了致命错误.找不到所需的库 hostfxr.dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我在其他计算机上运行我的 WPF 应用程序时,它会抛出该错误.
When i run my WPF application on other computer it throw me that error.
Description: A .NET Core application failed.
Application: SamplerSLEX.exe
Path: C:\Users\admin\Downloads\TesterSLEX\TesterSLEX\SamplerSLEX.exe
Message: A fatal error occurred. The required library hostfxr.dll could not be found.
If this is a self-contained application, that library should exist in
[C:\Users\admin\Downloads\TesterSLEX\TesterSLEX\].
If this is a framework-dependent application, install the runtime in the global location [C:\Program
Files\dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or
register the runtime location in [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x64\InstallLocation].
添加库运行时 3.1.0 对我有帮助.
Add library runtime 3.1.0 it help me.
WPF netcoreapp3.0
WPF netcoreapp3.0
推荐答案
进一步 Ajith 的回答,部署模式:自包含"也可以在 Visual Studio 2019 中选择:
Further to Ajith's answer, "Deployment Mode: Self Contained" can also be selected in Visual Studio 2019 here:
这篇关于发生了致命错误.找不到所需的库 hostfxr.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!