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

查看:322
本文介绍了.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:

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

<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安装程序包.

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天全站免登陆