Search code examples
c#.netdocumentationxml-documentation

Can I generate .MD files from XML Documentation?


I have used Sandcastle to document my class libraries recently. However, I have recently discovered that Sandcastle is no longer developed by Microsoft: https://archive.codeplex.com/?p=sandcastle.

I have had a look online on GitHub and I see that lots of open source projects use .MD (MarkDown) files these days. I see that .MD files are supported by GitHub and TFS. How can I generate .MD files from XML Documentation files?

I have spent the last few hours Googling this. For example, I have found this with only a few hundred downloads: https://github.com/lijunle/Vsxmd/tree/master/Vsxmd I am not asking for tool recommendations. I am asking if it is possible to convert .XML Documentation to .MD files.


Solution

  • Of course it is possible to generate markdown from XML comments. The obvious question is: Why? The best answer is: to generate a website from the markdown content.

    DocFX is essentially the replacement to Sandcastle. I'm using it to generate a documentation website from XML comments in C# code.