I'm trying to use System.CommandLine
and I've installed the nuget package:
Install-Package System.CommandLine -Version 2.0.0-beta1.21308.1
According to this Microsoft article, I should be able to just write a Main() method with my signature and it should auto-magically work:
static void Main(FileInfo input, FileInfo output)
{
Console.WriteLine($"Hello World! {input} {output}");
}
However my Main() method signature is rejected and I get CS5001: Program does not contain a static 'Main' method suitable for an entry point
.
Am I doing something wrong? According to the article, this is how System.CommandLine
should be working.