When creating a console application you often want to be able to use command line arguments to control what the application does. In this post we explore how we can use System.CommandLine to build a command line application. System.CommandLine is an… more »
Archives for: "May 2021"
Add GitHub Actions While not really necessary for writing a simple application I like to add GitHub actions to projects. This helps to automate the building and testing of changes to ensure that we don't accidently introduce known defects. In the root… more »
Using git as a Source Code Managment (SCM) tool is a great way to manage source code. While creating a example console application to demonstrate how to use System.CommandLine I documented most of what I was doing. I had originally included a lot of… more »
Posted by robert on May 20, 2021 in .net
System.CommandLine is an open source .net command line parser. Once you have configured the command line with the available commands, options, arguments, directives and delimiters you can run your application and pass in the arguments. CommandLine will parse the tokens provided on the command line and evaluate them against the configured command line. By implementing your own IConsole you can change where the output is directed. more »
Posted by robert on May 19, 2021 in Uncategorized
And now for a completely useless post. A long time ago in a world without internet typing characters was a premium.1 To account for this premium most applications would use command line options that had a single characters. A good example of this is the… more »
Posted by robert on May 18, 2021 in Uncategorized
Create new project from template Using the dotnet new command, create a application based upon the console template. iesoftwaredeveloper:~/repos$ dotnet new console --output SimpleCmdLine/src --name SimpleCmdLine The template "Console Application" was… more »
Posted by robert on May 14, 2021 in Uncategorized
Nothing is more frustrating to a software developer than phantom errors. It is the the wasted hours over some insignificant piece of code that was working and suddenly doesn't and you can't seem to see anything wrong with it. I present the following as… more »