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.
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With