linux - 如何为 debian :jessie 构建 .net 核心应用程序

标签 linux asp.net-core asp.net-core-2.1 debian-jessie

我已经使用 .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-x64RID .但正如你所见between the line129 and Line233 ,没有这样一个名称为 debian:jessie-x64RID

您需要改用 debian.8-x64

关于linux - 如何为 debian :jessie 构建 .net 核心应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55370954/

相关文章:

linux - 在 bash 中使用从字符串解析的数组

linux - 尝试使用 "current"宏时出现编译错误

linux - ubuntu安装mpich时添加路径

c# - .NET Core EntityFramework Identity - 更改 IdentityOptions(不在 Startup.cs 中)

asp.net-core - 无法配置 HTTPS 端点。未指定服务器证书,找不到默认的开发者证书

c# - 寻找一种有效的方法来使用 Entity Framework Core 为每一行检索一组多对多子项

python - Python 中的 USB 内存棒序列号

python - 如何在 .NET-Core 应用程序中使用 Python?

javascript - Angular 5/6 : Handle File Download (w/Friendly File Name) from ASP. NET 核心 API HTTP

asp.net-core - 如何在 ASP.NET Core 2.1 中对静态文件强制进行 https 重定向?