0

I have a console application that I want to publish for Windows and Ubuntu so end user can install and use it easily. The intended user is not a developer but able to use a CLI.

I can generate a release build with dotnet publish and zip it.

  • What is the release channel then?
  • Should I build a --self-contained release?
  • How is my tool placed into the $PATH on the users machine?
  • Should I provide an installer for Windows and a PPA for Ubuntu?
aggsol
  • 2,343
  • 1
  • 32
  • 49

1 Answers1

0

In general, a command for publishing console app is dotnet publish -c Release -r win10-x64

You should change win10-x64 by correct rid which belongs to OS such as linux-x64, osx.10.14-x64

What is the release channel then?

It depends, if it is running on Window or Linux, it will be .exe file

Should I build a --self-contained release?

--self-contained makes you to isolate any 3rd libraries and a release package. If you aren't sure the host doesn't install any 3rd libraries, so --self-contained will help you. Thus a build will be larger than.

How is my tool placed into the $PATH on the users machine?

Once again, it depends on your target OS. Each OS has a different way to set $PATH. And if you want to custom a cli as dotnet or npm, check in the link Custom commands in windows Command Prompt

Should I provide an installer for Windows and a PPA for Ubuntu?

If you are DevOps Engineer, so you don't want it because it isn't friendly with CLI. You want only release package.

Johnathan Le
  • 675
  • 3
  • 8
  • It's not about DevOps. Where would I point the end user to get my tool? Why would they user `npm`? – aggsol Sep 09 '19 at 11:48
  • 1
    Oh If you mean how end-user can execute your tool in your computer , so you actually need to have Installer tool with adding @PATH. DotNet Publish just helps you to create .exe that can be runable by cli or double-clicks. – Johnathan Le Sep 09 '19 at 11:55