Creating a .deb from Release instead of Debug #148

Closed
opened 2026-01-29 16:30:37 +00:00 by claunia · 3 comments
Owner

Originally created by @CryoViking on GitHub (Sep 16, 2024).

This might've already been asked before, but I can't seem to easily find an existing issue nor did I see a clear way to do it on the README.

Is there a way I can run dotnet deb and have it build a *.deb file from the result of dotnet publish instead of dotnet build?

Originally created by @CryoViking on GitHub (Sep 16, 2024). This might've already been asked before, but I can't seem to easily find an existing issue nor did I see a clear way to do it on the README. Is there a way I can run ``dotnet deb`` and have it build a ``*.deb`` file from the result of ``dotnet publish`` instead of ``dotnet build``?
Author
Owner

@atauenis commented on GitHub (Sep 16, 2024):

dotnet deb -c Release -r linux-x64
or:
dotnet publish -c Release -r linux-x64 -t:CreateDeb,Clean

All (or almost all) popular arguments for dotnet publish are working with dotnet deb. And with -t: argument it's possible to specify a longer set of commands, like CreateDeb,CreateRpm,Clean.

@atauenis commented on GitHub (Sep 16, 2024): `dotnet deb -c Release -r linux-x64` or: `dotnet publish -c Release -r linux-x64 -t:CreateDeb,Clean` All (or almost all) popular arguments for `dotnet publish` are working with `dotnet deb`. And with `-t:` argument it's possible to specify a longer set of commands, like `CreateDeb,CreateRpm,Clean`.
Author
Owner

@CryoViking commented on GitHub (Sep 17, 2024):

Thanks for the answer, I had figured it out like 30 minutes later but forgot to close the issue. My next thing is figuring out how to run a preinst and postinst script

@CryoViking commented on GitHub (Sep 17, 2024): Thanks for the answer, I had figured it out like 30 minutes later but forgot to close the issue. My next thing is figuring out how to run a preinst and postinst script
Author
Owner

@atauenis commented on GitHub (Sep 17, 2024):

My next thing is figuring out how to run a preinst and postinst script

Resave the csproj file to use LF line endings, and put scripts inside <PropertyGroup> <PostInstallScript><![CDATA[ ]]></PostInstallScript> (<PreRemoveScript>).

@atauenis commented on GitHub (Sep 17, 2024): > My next thing is figuring out how to run a preinst and postinst script Resave the csproj file to use LF line endings, and put scripts inside `<PropertyGroup> <PostInstallScript><![CDATA[ ]]></PostInstallScript>` (`<PreRemoveScript>`).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/dotnet-packaging#148