Avalonia 打包成Linux的deb安装包

使用 dotnet-deb 工具安装自定义 .NET 应用的 .deb 包

1.安装 dotnet-deb 打包工具

dotnet tool install --global dotnet-deb

2.在项目根目录下打开命令窗口。

3.运行以下命令:
dotnet deb install
dotnet restore -r linux-x64
dotnet msbuild <项目名称>.csproj /t:CreateDeb /p:TargetFramework=net6.0 /p:RuntimeIdentifier=linux-x64 /p:Configuration=Release
最后在 bin 文件夹下可以找到生成的 deb 文件

例子:
dotnet deb install
dotnet restore -r linux-x64
dotnet msbuild YourLinuxDesktop.csproj /t:CreateDeb /p:TargetFramework=net6.0 /p:RuntimeIdentifier=linux-x64 /p:Configuration=Release

打包成arm架构
dotnet restore -r linux-arm64
dotnet msbuild FionTuDSP.csproj /t:CreateDeb /p:RuntimeIdentifier=linux-arm64 /p:Configuration=Release

posted @ 2025-01-14 09:28  筑丹期码农  阅读(426)  评论(1)    收藏  举报