dotnet-config
dotnet-config copied to clipboard
DotNetConfig.CommandLine not compatible with latest prerelease of System.Commandline
Describe the Bug
Using the latest version of DotNetConfig.CommandLine - 1.0.6 with the latest version of System.CommandLine - 2.0.0-beta4.22272.1 causes type load error.
Steps to Reproduce
- Create a basic console app with the above versions of both packages.
- Create a root command, call
RootCommand.WithConfigurableDefaults(). - Run the program
Expected Behavior
The app does not crash.
Exception with Stack Trace
Unhandled exception. System.TypeLoadException: Could not load type 'System.CommandLine.IArgument' from assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
at System.CommandLine.CommandLineExtensions.WithConfigurableDefaults[T](T command, String section, Config configuration)
at Program.<Main>$(String[] args) in C:\App\Program.cs:line 53
at Program.<Main>(String[] args)
Version Info
-
DotNetConfig.CommandLine-1.0.6 -
System.CommandLine-2.0.0-beta4.22272.1
Yep, the upstream API is changing a lot between releases, I just can't keep up fast enough. If you could take a shot at this in a PR, it would be great!
Otherwise, I'm planning on sitting this one out until it's stable and ships.
upstream STILL not close to being stable. Closing this for now, please reopen when they do ship. It looks like it will require substantial rework.