dotnet 运行报告 '.NETFramework,Version=v4.8 未找到'

在我的 Mac OS/usr/local/share/dotnet/sdk/5.0.300/Microsoft.Common.CurrentVersion.targets(1216,5): error MSB3644: The reference assemblies for .NETFramework,Version=v4.8 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks [/Users/tommie/projects/zzz/zzz/zzz.csproj] 上运行“dotnet run”时出现以下错误

我的代码来自 Visual Studio 8.9,在 .net 框架上最多仅支持 4.8 但是当我查看“https://aka.ms/msbuild/developerpacks”时,4.8 不可用。只有 5.0 可用。 Visual Studio 8.10 显然支持 5.0,但还不是正式版本。

stack overflow dotnet run reporting '.NETFramework,Version=v4.8 were not found'
原文答案
author avatar

接受的答案

我在詹金斯服务器上遇到了此确切的错误,该服务器使用msbuild: error MSB3644: The reference assemblies for .NETFramework,Version=v4.8 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application 执行作业。关于Visual Studio和Macos有一些来回的问题,这些内容使事情变得有些混乱,但是对我来说,安装“ .NET Framework 4.8开发人员包装脱机安装程序”,如Alsein所建议的,纠正了我的问题。在这里链接 https://dotnet.microsoft.com/en-us/download/dotnet-framework/thank-you/net48-developer-pack-offline-installer


答案:

相关问题