How do I export the code documentation in C# / VisualStudio 2008?

21,095

Solution 1

Actually it's in the project properties. Build tab, Output section, XML documentation file, and enter the filename. It will be built on every build of the project.

After that you can build the actual help with Sandcastle.

Solution 2

You could try NDOC or SandCastle if you dont mind using 3rd party tools.

Solution 3

Be careful if you're using LINQ to SQL as you won't be able to easily add sustainable comments to the auto-generated objects.

Solution 4

Late comment, but worth adding that even though Sandcastle is mothballed, the Sandcastle Help File Builder remains in active development, and I found it very powerful and straightforward to dive into when dealing with just this situation--install to rich .chm and .html/.asp output in a couple hours.

Solution 5

The previous answers are really out of date. Here are some more modern options:

  • DocFX: This is probably your best bet because it runs on Linux, macOS, and Windows and it's supported by the .NET Foundation.
  • Sandcastle Help File Builder (SHFB): This one is still supported but it might not be as active.
Share:
21,095
darkAsPitch
Author by

darkAsPitch

I am an software developer that is not afraid to get his hands dirty... I done time in Visual Basic and never complained. PHP? Sure. I can write beautiful code in any language. But Python really rocks my boat. And c# I like too. I tend to collect a lot of different tools and am especially fond of those that work well together - as opposed to technologies that tend to create silos with NIHS. As I mature as a software developer, I have found that my passion for the craft grows while at the same time my willingness to participate in flame wars shrinks. Let's just get it done. And make the user happy.

Updated on July 09, 2022

Comments

  • darkAsPitch
    darkAsPitch almost 2 years

    I have always made a point of writing nice code comments for classes and methods with the C# xml syntax. I always expected to easily be able to export them later on.

    Today I actually have to do so, but am having trouble finding out how. Is there something I'm missing? I want to go Menu->Build->Build Code Documentation, but there is no option to do that, there.

  • Biri
    Biri almost 16 years
    You can still write an XSL/XSLT to format the XML to a more nice result.