2017-10-18 130 views
1

是否可以將發佈的.NET Core 2.0應用程序轉換爲.deb文件? 我發佈了我的應用dotnet publish -c Release -r ubuntu.16.04-x64。現在,我的目標是要有一個可以安裝在Ubuntu機器上的deb文件。發佈爲deb文件的.NET Core 2.0應用程序

+0

你不需要* .deb。只需複製發佈文件夾並通過'dotnet yourapp'運行應用程序 –

回答

0

如果要爲.NET核心應用程序創建.deb程序包,可以使用dotnet-deb

要安裝dotnet-deb,添加下列引用到你的.csproj文件:

<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安裝程序包。

我是dotnet-deb的維護者,如果您有任何疑問,請隨時提出後續問題或轉到https://github.com/qmfrederik/dotnet-packaging

相關問題