question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Command-line app development and distribution workflow

See original GitHub issue

This is kind of related to dotnet/sdk#8443.

Is there an easy way to develop, build and distribute command-line apps in .NET Core 2.0?

  • In Python, you set entry_points in setup.py and install app with pip install -e . during development.
  • In Node.js, you set bin in package.json and install app with npm link during development.
  • In Go, you write a main() function and install app with go install.
  • Etc.

So I understand that we can produce either portable (DLL) or self-contained (EXE) builds with dotnet publish -c <CONFIGURATION> -r <RUNTIME_IDENTIFIER>, but what happens next?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
KathleenDollardcommented, Feb 8, 2018

Thank you for your input.

You’re “What’s hard” largely aligns with our backlog and we’ll keep it in our considerations.

We are working on the argument story. Nate McMaster’s library is not a bad place to be right now. We’re hoping to do better.

Kathleen


From: Arthur White notifications@github.com Sent: Wednesday, February 7, 2018 2:40 PM To: dotnet/cli Cc: Kathleen Dollard; Mention Subject: Re: [dotnet/cli] Command-line app development and distribution workflow (#8547)

What’s easy

  • Almost everything: no major difficulty with NuGet so far.
  • Searching and downloading packages directly from Visual Studio (Code|Mac). The integration is nice!
  • Automatical dependency management and cleaning.

What’s hard

What isn’t there

How difficult is setting up argument management and help

I don’t have a definitive opinion about this. Actually, I’m barely digging in the .NET ecosystem as I decided to learn C# only 2 weeks ago. Making a CLI was just a pretext. 🤓

I use the McMaster.Extensions.CommandLineUtilshttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.nuget.org%2Fpackages%2FMcMaster.Extensions.CommandLineUtils%2F&data=04|01|kathleen.dollard%40microsoft.com|433323fb37124454e37d08d56e7bd781|ee3303d7fb734b0c8589bcd847f1c277|1|0|636536400534247175|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D|-1&sdata=IXUu2r9AGk330OwsT3JhuZVgr%2FjjDWvMCNs94WEVM3c%3D&reserved=0 package and it does the job pretty well so far. Too bad it’s not a Microsoft “official” package anymore, even if it seems (well) maintained by Microsoft employees. Also, the documentation seems poor compared to something like Python’s argparsehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.python.org%2F3%2Flibrary%2Fargparse.html&data=04|01|kathleen.dollard%40microsoft.com|433323fb37124454e37d08d56e7bd781|ee3303d7fb734b0c8589bcd847f1c277|1|0|636536400534247175|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D|-1&sdata=9Za8AdM%2B9Yrfl96a2QMB7KhCxZFAnDEK9bvlcL1wYLQ%3D&reserved=0.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdotnet%2Fcli%2Fissues%2F8547%23issuecomment-363935924&data=04|01|kathleen.dollard%40microsoft.com|433323fb37124454e37d08d56e7bd781|ee3303d7fb734b0c8589bcd847f1c277|1|0|636536400534247175|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D|-1&sdata=Cr6DVxELyVqdWAhAMRO4sovVzP66IH4Mrg9REmjwbYY%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAFktXtKIbnZCwsVzGsUYb_cxvCL3fy8aks5tSiZygaJpZM4R73Kr&data=04|01|kathleen.dollard%40microsoft.com|433323fb37124454e37d08d56e7bd781|ee3303d7fb734b0c8589bcd847f1c277|1|0|636536400534247175|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D|-1&sdata=hfc44YKWRfEFt1T0H6w1%2Feg3Jlsi7Wsr0hKvfVUeTNg%3D&reserved=0.

0reactions
xthezealotcommented, Feb 8, 2018

What’s easy

  • Almost everything: no major difficulty with NuGet so far.
  • Searching and downloading packages directly from Visual Studio (Code|Mac). The integration is nice!
  • Automatic dependency management and cleaning.

What’s hard

  • We only see a short summary of each package description so choosing the best one requires a visit to each project site. Integrating READMEs (when available) like NPM does should ease the process.
  • Figuring out the minimal requirements of a package (.NET Core and/or .NET Framework and which version).
  • Not hard but boring: the dialog asking for licenses acceptance at every package install.
  • Package signing but as I see, it’s also a WIP.

What isn’t there

  • Package search from the CLI like npm search.
  • Sorting search results by total number of downloads rather than “relevance”. Thats an old request.
  • Convenient CLI helpers like npm version or npm outdated.
  • Interesting stats about the package code (like test coverage, at least).
  • Maybe an in-browser playground for each package. But I assume that’s a lot of work for little benefit.

How difficult is setting up argument management and help

I don’t have a definitive opinion about this. Actually, I’m barely digging in the .NET ecosystem as I decided to learn C# only 2 weeks ago. Making a CLI was just a pretext. 🤓

I use McMaster.Extensions.CommandLineUtils and it does the job pretty well so far. Too bad it’s not a Microsoft “official” package anymore, even if it seems (well) maintained by Microsoft employees. Also, the documentation seems poor compared to something like Python’s argparse.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build your app from the command line | Android Studio
Find out how you can execute all the build tasks available to your Android project using the Gradle wrapper command line tool.
Read more >
How to distribute your application with Firebase App ...
Third Strategy of distribution: command line. You can also distribute your installer using the Firebase CLI. Via the command line, you can ...
Read more >
How to build and distribute beautiful command-line ...
This tutorial will walk you through the process of creating a simple game running in the terminal, using Symfony's Console component as a ......
Read more >
Firebase App Distribution using CLI
Firebase App Distribution is a service that allows you to distribute pre-release apps to testers. It's like using Google Play for ...
Read more >
Distribute Android apps to testers using the Firebase CLI
This guide describes how to distribute APKs to testers using the Firebase CLI. The CLI tool lets you specify testers and release notes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found