0

I am trying to get docfx to generate a doc website based off of a C# library and I can't seem to get any of the commands covered in the documentation to work.

On the quickstart page it states to use the following command to initialize a template docfx init -q however when I run this command I get the following error message:

'init' was not matched. Did you mean 'new'?
'-q' was not matched. Did you mean '-h'?
Required command was not provided.
Unrecognized command or argument 'init'
Unrecognized command or argument '-q'

Usage:
  docfx [options] [command]

Options:
  --version         Show version information
  -?, -h, --help    Show help and usage information

Commands:
  new <templateName>     Creates a new docset.
  restore <directory>    Restores dependencies before build.
  build <directory>      Builds a docset.
  serve <directory>      Serves content in a docset.

The documentation (as far as I can tell) doesn't cover the options displayed by the tools output. I have checked a number of times now to make sure I am not going insane but I definitely downloaded the package from the page listed on the quickstart page.

Does anyone regularly use Docfx and can tell me how to go about generating the html for my library?

1 Answers1

1

Looks like you're using 3.x, which is undocumented. You can download 2.59.2 here

Sardelka
  • 354
  • 3
  • 9
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 06 '22 at 04:32
  • It seems that the recommended command `dotnet tool update -g docfx` will install version 3.*, but the syntax for this version differs from 2.*. I got the same errors, exchanged the files in `C:\Program Files\docfx` with the files of version 2.* and it worked again. – martinstoeckli May 19 '23 at 07:12