gpt4 book ai didi

visual-studio - 发生了 fatal error 。找不到所需的库 hostfxr.dll

转载 作者:行者123 更新时间:2023-12-03 07:35:08 28 4
gpt4 key购买 nike

当我在其他计算机上运行我的 WPF 应用程序时,它会抛出该错误。

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 对我有帮助。

WPF netcoreapp3.0

最佳答案

除了 Ajith 的回答之外,还可以在此处在 Visual Studio 2019 中选择“部署模式:自包含”:

GUI in Visual Studio

关于visual-studio - 发生了 fatal error 。找不到所需的库 hostfxr.dll,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59284895/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com