【发布时间】:2021-12-30 04:16:22
【问题描述】:
在安装了 .NET 6.0 的 Mac 上运行 .NET Core 项目会导致一个奇怪的错误。
lukepuplett@Lukes-Air > ~/Documents/Git/Repo/src/Corp.App.Mvc > > master ± > dotnet run Corp.App.Mvc.csproj
A fatal error occurred. The required library libhostfxr.dylib could not be found.
If this is a self-contained application, that library should exist in [/Users/lukepuplett/Documents/Git/Repo/src/Corp.App.Mvc/bin/Debug/net5.0/].
If this is a framework-dependent application, install the runtime in the global location [/usr/local/share/dotnet/x64] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [/etc/dotnet/install_location].
The .NET runtime can be found at:
- https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=osx.11.1-x64&apphost_version=5.0.12
请注意,项目构建良好。
已安装 macOS Monterey、Apple Silicon M1 和 .NET 6.0。
【问题讨论】:
标签: .net-6.0