-
Create a solution
-
Create a console project using the dotnet CLI and update to use a full class and main entry point
dotnet new console {your project name}
-
Add a reference to the nuget package:
dotnet add package Floatingman.CommandLineParser
-
Inherit from
ConsoleDecorator -
Execute
Run(args);inside the main entiry point -
Add a folder called plugins to the project
-
Create a command project
- this project will have two classes
- the args class, which defines the actual command line arguments
- the command class, which defines the
Executebehaviour
- this project will have two classes
-
In this first pass, we will be using a locally defined library and including it as a reference, in a subsequent pass we will use an external library and include it as a package.
The execution requires the plugin libraries to be under the plugins folder. The plugin library is the command library.
By executing dotnet publish binaries are made of the executables and libraries, the contents of the publish folder of the command library need to be copied to the plugins folder of the application.