我已经使用 .net 核心创建了一个示例应用程序。我需要为 debian:jessie os 构建应用程序。我有以下命令
dotnet restore MySampleApp.sln -r -debian:jessie-x64
dotnet build MySampleApp.csproj --verbosity q -c Release -r -debian:jessie-x64
但是它显示这样的错误信息
error : NETSDK1056: Project is targeting runtime '-debian:jessie-x64' but did not resolve any runtime-specific packages. This runtime may not be supported by the target framework.
但我可以使用 alpine Linux 运行相同的应用程序而不会出现任何错误
dotnet restore MySampleApp.sln -r alpine.3.7-x64
dotnet build MySampleApp.csproj --verbosity q -c Release -r alpine.3.7-x64
最佳答案
团队提供了a complete list for Runtime IDentifiers on GitHub .
确实,line30 中定义了 alpine.3.7-x64
的 RID
.但正如你所见between the line129 and Line233 ,没有这样一个名称为 debian:jessie-x64
的 RID
。
您需要改用 debian.8-x64
。
关于linux - 如何为 debian :jessie 构建 .net 核心应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55370954/