0

I have my visual studio 2022 project with c# and I want to create the documentation but I don't want more files and folders to my project.

  • Docfx create folders and files.
  • SandCastle you even have to create another project inside your solution.

There is a way to run a command and generate the web page without creating any extra file in the project/solution?

Thanks.

Jiale Xue - MSFT
  • 3,560
  • 1
  • 6
  • 21
  • 1
    Technically that's impossible as the intermediate files play important roles. Both DocFx and Sandcastle are open sourced, so you can spend some time on their code base to see why. – Lex Li Aug 10 '22 at 05:58

1 Answers1

1

If you are just wanting to generate documentation from your source code xml comments than DocFx does not require that many new files to be be checked into source control. Sure you will need the basic project structure but all the intermediate / generated files in the output can be excluded from your committed source code using .gitignore files (assuming you are using git).

For example, in these tutorials

You would only really need

  • docfx.json
  • index.md
  • toc.yml
  • api/index.md
  • api.index.yml
  • .gitignore

If you add the following lines to the generated .gitignore from tutorial 1 then all the intermediate and generated documentation yml files will never be committed to git.

api/*.yml
api/.manifest

Hopefully this helps, I know it does not get you 0 extra files like you asked but its a fairly light weight solution to generating api documentation.

groogiam
  • 169
  • 4