.NET Core 2.0应用程序发布为deb文件

dav*_*vez 4 .net ubuntu .net-core asp.net-core-2.0

是否可以将已发布的.NET Core 2.0应用程序转换为.deb文件?我通过发布了我的应用dotnet publish -c Release -r ubuntu.16.04-x64。现在,我的目标是拥有一个可以在Ubuntu计算机上安装的deb文件。

Fre*_*ier 11

如果要.deb为.NET Core应用程序创建包,则可以使用dotnet-deb

要安装dotnet-deb,请在.csproj文件中添加以下引用:

<ItemGroup> <PackageReference Include="Packaging.Targets" Version="0.1.1-*" /> <DotNetCliToolReference Include="dotnet-deb" Version="0.1.1-*" /> <ItemGroup>

然后,运行dotnet restoredotnet publish -c Release -f netcoreapp2.0 -r ubuntu.16.04-x64。这将为您生成一个Debian安装程序包。

我是的维护者,如有dotnet-deb疑问,请随时提出后续问题,或直接前往https://github.com/qmfrederik/dotnet-packaging


Oma*_*jid 2

看起来你想要https://github.com/qmfrederik/dotnet-packaging!它提供了一些命令,例如dotnet deb将项目打包到适用于 Linux 的 deb/rpm/tar 中。