Closed harrison314 closed 3 years ago
That's Spectre.Console. Try updating the version to the latest one if possible.
Using the Spectre.Console in versions 0.38.0 and 0.39.0 program throws next error:
Unhandled exception. System.TypeLoadException: Method 'RegisterLazy' in type 'Statiq.App.CommandServiceTypeRegistrar' from assembly 'Statiq.App, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
at Statiq.App.Bootstrapper..ctor(String[] arguments)
at Statiq.App.BootstrapperFactory.Create(String[] args)
at Harrison314Blog.Program.Main(String[] args)
Seems like there are two versions of Statiq referencing different versions of Spectre.Console.
Seems like there are two versions of Statiq referencing different versions of Spectre.Console.
The only Spectre.Console reference is in Statiq.App - is gets brought into everything else transitively. I'll guess that the missing method exception happened because Statiq.App (and other Statiq Libraries) are bound to Spectre.Console 0.37.0 so when you updated Spectre.Console locally it broke that binding due to method differences (that's mostly to be expected).
The real question is why you're seeing an error with the help command in the first place. I can replicate, so best thing now is probably to update the Spectre.Console version in use by Statiq officially since updating locally creates a compatibility break. I'll do that for the next release (out in a day or two, just finishing up a few caching things).
@daveaglick Any [
or ]
in descriptions must be escaped since we allow markup there.
Ah, that makes sense @patriksvensson, I'm guessing I've got at least one set of brackets somewhere carried over from Spectre.Cli use. Should be easy enough to fix up.
@daveaglick The CommandOption
and CommandAttribute
should not be escaped. Only things like descriptions.
@daveaglick I can submit a PR for this if you want
Nah, I'll get it...unless you really want to :)
This is resolved, it'll ship with the next release soon.
Thanks for the bug report!
Running a Statiq.Framework 1.0.0-beta.41 app with options --help command always results in this error message:
My bootstraper code: