Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET Core 2.0 application published as deb file

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.

like image 559
davez Avatar asked Oct 18 '17 11:10

davez


People also ask

Which is better deb or RPM?

We all know that linux has many different distros like Ubuntu, kali, Manjaro, Fedora, etc. DEB is the software package extension as well as the format for the Debian linux; distribution of Linux. RPM on the other hand is the software package extension as well as the format for the linux distributions based on Red hat.

What is a deb application?

A DEB file is a software package used by the Debian Linux distribution and its variants, such as Ubuntu. DEB files are used primarily to install or update Unix applications.

Is a deb file an executable?

A file with the DEB file extension is a Debian Software Package file. They're used mainly in Unix-based operating systems, including Ubuntu and iOS. Every DEB file consists of two TAR archives that make up the executable files, documentation, and libraries.


2 Answers

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

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>

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.

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.

like image 180
Frederik Carlier Avatar answered Oct 07 '22 08:10

Frederik Carlier


Looks like you want https://github.com/qmfrederik/dotnet-packaging! It provides commands like dotnet deb to package up your project into a deb/rpm/tar for Linux.

like image 41
omajid Avatar answered Oct 07 '22 08:10

omajid