dotnet CLI Tool Build Redux

This post has been republished via RSS; it originally appeared at: Channel 9.

Last year we highlighted creating your own dotnet CLI tools, Do you dotnet cli? Here's how you can add your own tools...

Given how much has changed since then, it's time for an updated look at that.

Good thing Tom DuPont has that covered in this post (And boy, does he make it look easy! :)

How to make a dotnet CLI Tool

Good news, everyone! It is remarkably easy to make a new dotnet CLI (Command Line Interface) tool! I recently created a CLI tool for one of my new projects, Tact.NET RPC, and in this post I will be referencing that project as my example.

The Basics

Step 1) Create your CLI Console App ...
Step 2) Consume your CLI Tool NuGet Package ...

Development Tips

Here is a simple way to automate the creation and consumption of your CLI tool NuGet package during development.

Create a local package directory ...

Pack on post build ...

Execute on pre build ...

Increment version to update ...

[Click through to read the post and see the code]



REMEMBER: these articles are REPUBLISHED. Your best bet to get a reply is to follow the link at the top of the post to the ORIGINAL post! BUT you're more than welcome to start discussions here:

This site uses Akismet to reduce spam. Learn how your comment data is processed.