.NET Core 2.0 应用程序发布为 deb 文件 [英] .NET Core 2.0 application published as deb file

查看:27
本文介绍了.NET Core 2.0 应用程序发布为 deb 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Is it possible to transform published .NET Core 2.0 application to .deb file? I published my app by dotnet publish -c Release -r ubuntu.16.04-x64. Now, my goal is to have a deb file that can be installed on Ubuntu machine.

推荐答案

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

If you want to create .deb packages for your .NET Core applications, you can use dotnet-deb.

要安装 dotnet-deb,请将以下引用添加到您的 .csproj 文件:

To install dotnet-deb, add the following references to your .csproj file:

<代码><项目组><PackageReference Include="Packaging.Targets" Version="0.1.1-*"/><DotNetCliToolReference Include="dotnet-deb" Version="0.1.1-*"/><项目组>

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

Then, run dotnet restore and dotnet publish -c Release -f netcoreapp2.0 -r ubuntu.16.04-x64. This will generate a Debian installer package for you.

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

I'm the maintainer for the dotnet-deb, feel free to ask follow up questions or head over to https://github.com/qmfrederik/dotnet-packaging if you have questions.

这篇关于.NET Core 2.0 应用程序发布为 deb 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆