linux-如何为debian:jessie构建.net核心应用程序
作者:互联网
我已经使用.net core创建了一个示例应用程序.我需要为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,没有这样的RID,其名称为debian:jessie-x64.
您需要改用debian.8-x64.
标签:asp-net-core-2-1,asp-net-core,debian-jessie,linux 来源: https://codeday.me/bug/20191211/2105483.html