Open johnknoop opened 5 years ago
Microsoft.Extensions.Configuration is a powerful tool with the advantage of layered configurations: file, command-line, environment,.. But it lacks of a powerful commandline parser. There are some very good tools for this. I like these, but there are more good options:
I think this tools should integrate into Microsoft.Extensions.Configuration the same way that logging libraries like Serilog integrates with Microsoft.Extensions.Logging
This way we would have a rich offer of implementations but a good integration with other configuration layers
Related: #1058
The
Microsoft.Extensions.Configuration.Commandline
extension populates app configuration from command line arguments. However it has no support for things like validation or displaying help to the user. Is there a chance this tool can be integrated, so that if you enable command line config usingconfig.AddCommandLine<MyOptions>(args)
, it will validate the arguments based on the shape ofMyOptions
, and also display help if the user runsmy.exe --help
?