-
Notifications
You must be signed in to change notification settings - Fork 6
Use System.CommandLine
library for convinient CLI command parsing
#29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Out of curiosity, how much would it hurt us to retarget Repacker CLI to .NET 8.0? |
I ran an experiment with two SDKs (changed the target framework on SDK
SDK
|
It would make sense to aim for .NET 9.0 right away, bypassing the .NET 8.0, so that we can then upgrade to .NET 10.0 target (which will be LTS) if there will be no problems during the future transition. |
On |
10fdb4c
to
f19fc01
Compare
…rd compatibility
this also enables json reflection serializer in the trimmed executable because of introduction of the breaking change in .NET 8 Preview 7 see: https://learn.microsoft.com/en-us/dotnet/core/compatibility/serialization/8.0/publishtrimmed
f19fc01
to
4dee9df
Compare
Ok, this is a big one...
For more convenient development of current and future commands for the CLI, I suggest using the
System.CommandLine
library. This is used for thedotnet
utility and provides an API for creating CLIs. It is currently in therc
stage, but its API is quite stable.Advantages:
Disadvantages:
For now this PR is adraft because it contains many changes. In terms of functionality, (almost) everything has remained the same (except for the help command, which is generated by the library).
A self-contained executable is compiling without errors. The only thing is that the library warns about being tailored for .NET 8.0, but (so far) it compiles fine under .NET 6.0.
Link to the documentation: System.CommandLine overview